-
Inject profiling code
At the beginning of your .zshrc add following:
zmodload zsh/zprofand at the end add:
zprofThis will load zprof mod and display what your shell was doing durung your initialization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| await new Promise(function (resolve) { | |
| setTimeout(function () { | |
| resolve(); | |
| }, 1000); | |
| }); | |
| // ... Can be shortened to: | |
| await new Promise(function (resolve) { | |
| setTimeout(resolve, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class VIN { | |
| //from http://introcs.cs.princeton.edu/java/31datatype/VIN.java.html | |
| public static boolean isVinValid(String vin) { | |
| int[] values = { 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 0, 7, 0, 9, | |
| 2, 3, 4, 5, 6, 7, 8, 9 }; | |
| int[] weights = { 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 }; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # see: https://gist.github.com/gregorynicholas/2160046ec6946a2ce0fa | |
| # src: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # updated: 2015-06-06 | |
| # | |
| # ask for the administrator password upfront | |
| sudo -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Reads the version of the artifact from the Spring Boot application.yml. | |
| * Depends on the following in build.gradle: | |
| <pre> | |
| processResources { | |
| filesMatching('application.yml') { | |
| expand(project.properties) | |
| } | |
| } | |
| </pre> |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1