-
Go to https://developer.apple.com/downloads/index.action and search for "Command line tools" and choose the one for your Mac OSX
-
Go to http://brew.sh/ and enter the one-liner into the Terminal, you now have
brew
installed (a better Mac ports) -
Install transmission-daemon with
brew install transmission
-
Copy the startup config for launchctl with
ln -sfv /usr/local/opt/transmission/*.plist ~/Library/LaunchAgents
This file contains 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
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader | |
== Shell |
This file contains 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains 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
import java.lang.reflect.Method; | |
public class SystemPropertiesProxy { | |
/** | |
* This class cannot be instantiated | |
*/ | |
private SystemPropertiesProxy() { | |
} |
It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.
These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.
Credit to James Nitsch for inspiring this, and for figuring out the put
commands to enable these settings.
This file contains 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
# choose a folder that is in your PATH or create a new one | |
mkdir -p ~/.bin | |
# clone the source code to local path | |
git clone https://github.com/so-fancy/diff-so-fancy ~/.bin/diffsofancy_src | |
# make the script executable | |
chmod +x ~/.bin/diffsofancy_src/diff-so-fancy | |
ln -s ~/.bin/diffsofancy_src/diff-so-fancy ~/.bin/diff-so-fancy |
This file contains 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
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B) | |
set -g prefix C-space | |
unbind-key C-b | |
bind-key C-space send-prefix | |
# Set new panes to open in current directory | |
bind c new-window -c "#{pane_current_path}" | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" |