diff --git a/Byobu_CheatSheet.md b/Byobu_CheatSheet.md index 6961076..f9a18d3 100644 --- a/Byobu_CheatSheet.md +++ b/Byobu_CheatSheet.md @@ -33,4 +33,12 @@ Byobu/Tmux: #Kill split in focus Ctrl + F6 - + #Join all splits + Shift + F5 + + #Kill the current window + Ctrl + A + K + + #Move focus to next split + Shift + F3 + diff --git a/Elasticsearch_CheatSheet.md b/Elasticsearch_CheatSheet.md index 793575c..8c68ccd 100644 --- a/Elasticsearch_CheatSheet.md +++ b/Elasticsearch_CheatSheet.md @@ -59,3 +59,10 @@ #Check pending tasks curl -XGET http://localhost:9200/_cat/pending_tasks?v + + #Query using URL parameters + curl -X GET http://localhost:9200/samples/_search?q=school:Harvard + + #List index mapping + curl -X GET http://localhost:9200/samples + diff --git a/Flexbox_CheatSheet.md b/Flexbox_CheatSheet.md new file mode 100644 index 0000000..dafae37 --- /dev/null +++ b/Flexbox_CheatSheet.md @@ -0,0 +1,67 @@ + + + #Allow Flexbox display + display: flex; + + #Align items horizontally + justify-content: + #Options include: + flex-start; - items align to left of container + flex-end; - items align to right of container + center; - items align at center of container + space-between; - equal spacing between items, with first at start and final at end + space-around; - equal spacing around items + space-evenly; - even spacing around items with a full space at either end + + #Align items vertically + align-items: + #Options include: + flex-start; - items align to top of container + flex-end; - items align to bottom of container + center; - items align to vertical center of container + baseline; - items align to baseline of container + stretch; - items stretched to fit + + #Change direction + flex-direction: + #Options include: + row; - items placed the same as text direction + row-reverse; - items placed opposite to text direction + column; - items are placed top to bottom + column-reverse: items are placed bottom to top + + #Align specific item + align-self: + #Options include same values as 'align-items' but for a specific item + #Overrides 'align-items' + + #Wrap items + flex-wrap: + #Options include: + nowrap: every items is fit to a single line + wrap: items wrap around to additional lines + wrap-reverse: items wrap around to additional lines in reverse + + #Combination of direction and wrap + flex-flow: + #Options include: + row wrap; - sets rows and wraps them + row nowrap; + row reverse nowrap; + column reverse; + column wrap-reverse + column wrap + + #Space multiple lines a certain way + align-content: + #Options include: + flex-start; - lines packed at top of container + flex-end; - lines packed at bottom of container + center; lines packed at vertical center of container + space-between: lines display with equal spacing between them + space-around: lines display with equal spacing around them + stretch: lines are stretched to fit the container + + #Order items + order: + #Can be positive or negative. Default order value of 0. diff --git a/Flutter_cheatsheet.md b/Flutter_cheatsheet.md new file mode 100644 index 0000000..ca7c13f --- /dev/null +++ b/Flutter_cheatsheet.md @@ -0,0 +1,112 @@ +# Flutter + + CheatSheet + + # confirm if your flutter SDK is set up correctly and compatible with other platforms, devices and IDE. + `flutter doctor` or `flutter doctor -v` + + + # create a new flutter project from terminal + `flutter create NAME_OF_APP` + + + # create a new flutter project and replace the default package name flutter gives you com.example.myappname + `flutter create –org com.mywebsite NAME_OF_APP` + + + # set a specific language for the Android app and iOS; here we use Java for Android and objective-C for iOS + `flutter create --org=com.mywebsite --android-language=java --ios-language=objc NAME_OF_APP` + + + # mistakenly deleted a file, create it with its boilerplate codes. This will replace all missing files without creating everything from scratch + `flutter create --no-overwrite --org=com.mywebsite.NAME_OF_APP` + + + # list all devices connected and supported by the Flutter SDK + `flutter devices` + + # get current device id + `flutter --device-id` + + + # flutter help + `flutter -h` + + + # run a flutter app + `flutter run` + + + # to see more outputs while app is trying to build in debug mode + `flutter run -v ` + + + # after making stateless change(changing font size, color, widget size, shape, etc) + `Hot Reload (r): tap small r while app is running` + + + # after you make changes to class instances or things that will affect app’s current state + `Hot Restart(R): tap big R while app is running` + + + # take a screenshot from the terminal: + `tap small (s) when running the app in debug mode` + + + # lost connecting while debugging, connect your app back via + `flutter attach -d + + #Get the password for the e2e user + kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' + + #Get all pods in all namespaces and list from most resource hungry to less + kubectl top pod --all-namespaces | sort --reverse --key 3 --numeric | less + + #Describe specific pod in deployment that is in the selected namespace with a bit more detail + kubectl -n describe deployments.apps + + #Delete resources + kubectl delete + + #Get a deployment's status subresource + kubectl get deployment nginx-deployment --subresource=status + + #List all services in the namespace + kubectl get services + diff --git a/Linux_CheatSheet.md b/Linux_CheatSheet.md index 2582a5d..253c79a 100644 --- a/Linux_CheatSheet.md +++ b/Linux_CheatSheet.md @@ -39,6 +39,11 @@ Linux/Unix: #Create a new directory mkdir + + #Options include + -p if directory exists and also make parent directories as necessary + -v verbose + -m provide mode for creating directory #Print the working directory pwd @@ -218,14 +223,28 @@ Linux/Unix: #Install, build, remove and manage Debian packages apt-get + #Get current user id + id + #Creates a new user account adduser #Creates a new group groupadd - #Adds a user to a group + #Modify a user to a group usermod + + #Options + -c, --comment = add comment to user + -g, --gid = Specify the primary group for the user account + -G, --groups = Specify a comma-separated list of supplementary groups for the user account + -a, --append = add the supplementary groups to the user's current set of group + -d, --home = Specify a particular home directory for the user account + -m, --move-home = Move the user's home directory to a new location. Must be used with the -d option + -s, --shell = Specify a particular login shell for the user account + -L, --lock = Lock the user account + -U, --unlock = Unlock the user account #Remove a user from a group userdel @@ -265,9 +284,6 @@ Linux/Unix: #Determine system boot-up performance statistics systemd-analyze - - #Determine system boot-up performance statistics - systemd-analyze #Request system information / software version uname -a @@ -308,7 +324,7 @@ Linux/Unix: #Query optimisation -type = type of file - -name = matching with a filename + -name = matching with a filename #Look for a file with a giving name using query optimisation find . -type f -name @@ -353,11 +369,19 @@ Linux/Unix: #Write the output to a new file sort -o - - + #List Block Devices mounted on the system lsblk + #Download files from the internet + wget