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
| POW_ENABLED = false | |
| if POW_ENABLED && Rails.env.development? && !$rails_rake_task | |
| Debugger.settings[:autoeval] = true | |
| Debugger.settings[:autolist] = 1 | |
| Debugger.settings[:reload_source_on_change] = true | |
| Debugger.start_remote | |
| 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
| $ lsof -wni tcp:3000 | |
| $ kill -9 PID |
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
| git ls-files | xargs cat | wc -l |
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
| -(void) viewDidLoad { | |
| [super viewDidLoad]; | |
| dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
| //Here your non-main thread. | |
| NSLog (@"Hi, I'm new thread"); | |
| dispatch_async(dispatch_get_main_queue(), ^{ | |
| //Here you returns to main thread. | |
| NSLog (@"Hi, I'm main thread"); | |
| }); | |
| }); |
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
| defaults write com.apple.Xcode XCCodeSenseFormattingOptions '{ "BlockSeparator" = "" ; }' |
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
| 1. Remove xVim: rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin | |
| 2. Checkout the develop branch: git checkout develop | |
| 3. Open the xVim project | |
| 4. Ignore message about GC not being supported. Don't convert to Arc. | |
| 5. Select XCode 5 as your build target. | |
| 6. Set it to Release. | |
| 7. Build |
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
| brew update && brew upgrade | |
| brew uninstall -all pkgconfig imagemagick | |
| brew install pkgconfig imagemagick | |
| mdfind MagickWand.h | |
| mdfind MagickCore.pc | |
| sudo C_INCLUDE_PATH=<path to wand dir> PKG_CONFIG_PATH=<path to core dir> gem install imagemagick |
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
| GIT_COMMITTER_DATE="`date`" git commit --amend --date "`date`" |
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
| # Add the remote, call it "upstream": | |
| git remote add upstream https://github.com/whoever/whatever.git | |
| # Fetch all the branches of that remote into remote-tracking branches, | |
| # such as upstream/master: | |
| git fetch upstream | |
| # Make sure that you're on your master branch: | |
| git checkout master |
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
| import ( | |
| "fmt"; | |
| "strings"; | |
| ) | |
| func main() { | |
| s := []string{"this", "is", "a", "joined", "string\n"}; | |
| fmt.Printf(strings.Join(s, " ")); | |
| } |
OlderNewer