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
| function cdto { | |
| local targetfile; | |
| local searchdir; | |
| if [ -z "$2" ]; then | |
| searchdir=. | |
| targetfile=$1 | |
| else | |
| searchdir=$1 | |
| targetfile=$2 | |
| fi; |
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
| # Basic compilation rules for some common file formats | |
| TARGETS = # Actual files here | |
| .coffee.js : | |
| coffee -c $< | |
| .SUFFIXES: .js .coffee | |
| SRC=$(wildcard *.c) | |
| OBJS=$(SRC:.c=.o) |
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 config --global --add "difftool.twdiff.cmd" 'twdiff --wait "$LOCAL" "$REMOTE"' | |
| git config --global diff.tool twdiff |
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
| #!/usr/bin/env python | |
| '''I saw an Erlang solution to this problem, thought I'd give it a shot in Python. | |
| http://erlangquicktips.heroku.com/2010/01/06/following-a-spiral/ | |
| ''' | |
| def spiral(l): | |
| '''Take a list of lists that is assumed to be in row major order. | |
| Return a list generated by iterating through the elements of the structure | |
| in a spiral that moves closer to the center as you move clockwise. |
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
| <!DOCTYPE> | |
| <!-- Designed by Peter Vidani | |
| Found at http://www.tumblr.com/theme/467 | |
| --> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <meta name="generator" content="TextMate http://macromates.com/"> |
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 java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.StringWriter; | |
| import java.net.HttpURLConnection; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import oauth.signpost.OAuthConsumer; | |
| import oauth.signpost.basic.DefaultOAuthConsumer; | |
| import oauth.signpost.exception.OAuthCommunicationException; |
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
| # Basic compilation rules for CoffeScript | |
| run: script.js | |
| node script.js | |
| clean: | |
| rm script.js | |
| .coffee.js : | |
| coffee -c $< |
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
| aws.cloudwatch.api.us-east-1b.HTTPCode_Backend_2XX.count | |
| aws.cloudwatch.api.*.HTTPCode_Backend_2XX.count | |
| sumSeries(aws.cloudwatch.api.*.HTTPCode_Backend_2XX.count) | |
| timeShift(sumSeries(aws.cloudwatch.api.*.HTTPCode_Backend_2XX.count), '-1w') | |
| diffSeries(timeShift(sumSeries(aws.cloudwatch.api.*.HTTPCode_Backend_2XX.count), '-1w'), sumSeries(aws.cloudwatch.api.*.HTTPCode_Backend_2XX.count)) |
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
| [ | |
| { | |
| "name":"Pavel", | |
| "surname":"Gherghel", | |
| "gender":"male", | |
| "region":"Romania" | |
| }, | |
| { | |
| "name":"Ludmila", | |
| "surname":"Găină", |
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
| const _ = require("underscore"); | |
| const fs = require("fs"); | |
| // convert hex to base64 | |
| function challenge1(hex) { | |
| return Buffer.from(hex, "hex").toString("base64"); | |
| } | |
| // xor two hex encoded strings, return hex | |
| function challenge2(hex1, hex2) { |
OlderNewer