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
| [alias] | |
| st = status -sb | |
| ci = commit | |
| br = branch | |
| df = diff --word-diff | |
| lg = log --graph --decorate --date=format:'%d/%m/%y %H:%M' --pretty=format:'%C(yellow)%h%Creset -%C(bold red)%d%Creset %s %C(green)(%ad) %C(bold blue)<%an>%Creset' | |
| co = checkout | |
| pom = push origin master | |
| pr = pull-request | |
| ps = push |
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
| jest.mock('moment', () => { | |
| const moment = require.requireActual('moment'); | |
| return () => moment.utc('2018-08-22 00:07'); | |
| }); |
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
| # Don't open Apple Photos when connecting an external disk | |
| # from: https://www.reddit.com/r/photography/comments/3xkrw5/tip_how_to_stop_osx_apple_photos_from_launching/ | |
| defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES | |
| # Quicklook options | |
| defaults write com.apple.finder QLEnableTextSelection -bool TRUE | |
| killall Finder |
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
| zip -d filename.zip __MACOSX/\* |
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
| # from http://danilo.ariadoss.com/how-to-recursively-remove-ds_store-files-on-mac-os-x/ | |
| # and http://support.apple.com/kb/ht1629 | |
| find . -name '*.DS_Store' -type f -delete | |
| defaults write com.apple.desktopservices DSDontWriteNetworkStores true |
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
| require 'aws-sdk' | |
| require 'json' | |
| # from: http://stackoverflow.com/a/11482430 | |
| class String | |
| # colorization | |
| def colorize(color_code) | |
| "\e[#{color_code}m#{self}\e[0m" | |
| end |
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
| #!/bin/sh | |
| # Author: Massaki | |
| # based on http://www.devthought.com/code/create-a-github-pull-request-from-the-terminal/ | |
| usage () { | |
| echo "usage:" $@ | |
| exit 127 | |
| } |
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
| #define IS_IOS_6_1_OR_EARLIER (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) |
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
| // from: http://stackoverflow.com/a/5445161/1119197 | |
| static String convertStreamToString(java.io.InputStream is) { | |
| java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A"); | |
| return s.hasNext() ? s.next() : ""; | |
| } |
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
| for branch in `git branch -r | grep -v HEAD`; do git branch --track ${branch#*/} $branch; done |
NewerOlder