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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>DVTConsoleDebuggerInputTextColor</key> | |
| <string>0.995968 0.995968 0.995968 1</string> | |
| <key>DVTConsoleDebuggerInputTextFont</key> | |
| <string>BitstreamVeraSansMono-Bold - 14.0</string> | |
| <key>DVTConsoleDebuggerOutputTextColor</key> | |
| <string>0.995968 0.995968 0.995968 1</string> |
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 'rubygems' | |
| require 'bundler/setup' | |
| class SomeJob | |
| @queue = :some_queue | |
| def self.perform | |
| puts 'working - actually, sleeping...' | |
| sleep 1 | |
| puts 'done' |
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
| def symbolize obj | |
| if obj.is_a? Hash | |
| new_hash = {} | |
| obj.each { |key, value| new_hash[key.to_sym] = symbolize value } | |
| new_hash | |
| elsif obj.is_a? Enumerable | |
| obj.collect { |value| symbolize value } | |
| else | |
| obj | |
| 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
| Plain strings (207): foo | |
| Anchors (208): k$ | |
| Ranges (202): [a-f]{4} | |
| Backrefs (201): (...).*\1 | |
| Abba (193): ^(?!.*(.)(.)\2\1) | |
| A man, a plan (177): ^(.)[^p].*\1$ | |
| Prime (286): ^(?!(..+)\1+$) | |
| Four (199): (.)(.\1){3} | |
| Order (188): ^[abcdfgm](?![nar]|id) | |
| Triples (0): |
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
| $ gcc --version | |
| Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 | |
| Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn) | |
| Target: x86_64-apple-darwin13.0.0 | |
| Thread model: posix | |
| $ ./configure --with-ld-opt='-L/usr/local/lib/' --with-cc-opt='-I/usr/local/include/' --add-module=../nginx-push-stream-module --prefix=./build | |
| checking for OS | |
| + Darwin 13.0.0 x86_64 | |
| checking for C compiler ... found | |
| checking for --with-ld-opt="-L/usr/local/lib/" ... found |
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
| class Player | |
| def play_turn(warrior) | |
| unless @explored_left | |
| @explored_left = false | |
| return warrior.pivot! | |
| end | |
| fwd = @explored_left ? :forward : :backward | |
| rew = !@explored_left ? :forward : :backward |
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
| #include <stdio.h> | |
| #include <my_lib.h> | |
| int main(void) { | |
| printf("%s", my_function()); | |
| } | |
| /* | |
| Build me with: |
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
| # Updates if needed | |
| git checkout master | |
| git fetch | |
| git pull | |
| # Merge and reset | |
| git merge whatever_branch | |
| git reset origin/master | |
| # Commits everything as a single commit |
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
| var Robot = function(robot) {}; | |
| Robot.prototype.onIdle = function(e) { | |
| var r = e.robot; | |
| r.turn(); | |
| r.fire(); | |
| r.ahead(); | |
| }; | |
| Robot.prototype.onScannedRobot = function(e) { |
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
| var Robot = function(robot) { | |
| this.longAgo = 50; | |
| this.spot = this.longAgo; | |
| }; | |
| Robot.prototype.onIdle = function(e) { | |
| var r = e.robot; | |
| r.fire(); | |
| if (this.spot > this.longAgo) { | |
| r.rotateCannon(); |