- Stack (push, pop, stack pointer, stack frame pointer)
 - Heap (malloc, calloc, global, static)
 - Registers (addresses, values)
 - Instructions (mov, add, jmp, jne)
 
- push adds an element to the top of the stack
 - pop removes the top element from the stack
 
| defaults write com.apple.Dock appswitcher-all-displays -bool true | |
| killall Dock | 
| # high sierra | |
| sudo launchctl stop com.openssh.sshd | |
| sudo launchctl start com.openssh.sshd | |
| # latest | |
| sudo vim /etc/services # (update the port config for ssh and save) | |
| sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist | |
| sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist | 
| set_term_bgcolor(){ | |
| local R=$1 | |
| local G=$2 | |
| local B=$3 | |
| /usr/bin/osascript <<EOF | |
| tell application "iTerm" | |
| tell current session of current window | |
| set background color to {$(echo "scale=2; ($1/255.0)*65535" | bc),$(echo "scale=2; ($2/255.0)*65535" | bc),$(echo "scale=2; ($3/255.0)*65535" | bc)} | |
| end tell | |
| end tell | 
| # Input: list of rows with format: "<filesize> filename", e.g. | |
| # filesizes.txt | |
| ####################### | |
| # 1000K file1.txt | |
| # 200M file2.txt | |
| # 2G file3.txt | |
| # | |
| # Output: | |
| cat filesizes.txt | numfmt --from=iec | awk 'BEGIN {sum=0} {sum=sum+$1} END {printf "%.0f\n", sum}' | 
Git: Change DiffMerge Font-Size on Mac OSX
open -e ~/Library/Preferences/SourceGear\ DiffMerge\ Preferences
Append this to it
[File]
Font=22:76:consolas
| DSLContext database = Mockito.mock(DSLContext.class, Mockito.RETURNS_DEEP_STUBS); | |
| Mockito.when(database.select(ACTIVITY_TYPE.ID) | |
| .from(ACTIVITY_TYPE) | |
| .where(ACTIVITY_TYPE.SINGLE_PERSON_USABLE.isTrue()) | |
| .fetch(ACTIVITY_TYPE.ID)) | |
| .thenReturn(ImmutableList.of(singleActivityTypeId)); | |
| Mockito.when(database.select(ACTIVITY_TYPE.ID) | |
| .from(ACTIVITY_TYPE) | 
| # Command to open the webbrowser and immediately start searching | |
| # for the right keyword. | |
| # | |
| # Usage: | |
| # $ google test query | |
| # $ => Opens the browser on http://www.google.com/search?q=test+query | |
| # | |
| google() | |
| { | 
| // http://stackoverflow.com/questions/8098564/is-it-possible-to-specify-java-system-properties-when-running-groovy-from-comman | |
| /* | |
| System properties are set on the java command line using the | |
| java -Dpropertyname=value | |
| syntax. | |
| They can also be added at runtime using | |
| System.setProperty(name, value) | |
| or via the various | |
| System.getProperties().load() | |
| methods. |