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
<!--- | |
Put this at the top of your markdown file. | |
--> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<style> | |
body{ | |
margin: 0 auto; | |
font-family: Georgia, Palatino, serif; | |
color: #444444; | |
line-height: 1; |
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 Data.List | |
data Chip = Red | Blue | |
deriving Show | |
-- Shuffle two stacks of chips into one. The stack listed first will be on the | |
-- "bottom" | |
mergeChip :: [Chip] -> [Chip] -> [Chip] | |
mergeChip xs [] = xs | |
mergeChip [] ys = ys |
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
test |
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
(defn add-phone | |
"Add a phone number to a given service. There are a few steps we have to take: | |
- Validate the service name and token | |
- Validate the phone number | |
- Send a text message to the number | |
- Store the number in the database | |
Arguments: | |
request - an authorized HTTP request | |
Returns: | |
201 Resource Created - phone number added to a service |
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
<?php | |
/* this is a comment */ | |
$hi; |
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
/* Add these lines to | |
~/Library/Application\ Support/Google/Chrome/Default/User\ StyleSheets/Custom.css | |
Other OSes here: http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
*/ | |
#-webkit-web-inspector.platform-mac.platform-mac-snowleopard .monospace, | |
#-webkit-web-inspector.platform-mac.platform-mac-snowleopard .source-code | |
{ | |
font-family: Consolas, Monaco, monospace !important; | |
} |
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
curl -O http://python-distribute.org/distribute_setup.py && \ | |
python distribute_setup.py && \ | |
easy_install virtualenv |
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
history 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20 | |
1 3427 34.2734% git | |
2 1168 11.6812% ll | |
3 1164 11.6412% cd | |
4 791 7.91079% vi | |
5 578 5.78058% ack | |
6 299 2.9903% j | |
7 257 2.57026% cat | |
8 250 2.50025% python |
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
factory_line = ('{}Factory {}Factory = client.getAccount().get{}Factory();'.format( | |
list_type, instance_name, list_type)) |
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
using System; | |
using Twilio; | |
class Example | |
{ | |
static void Main(string[] args) | |
{ | |
// Find your Account Sid and Auth Token at twilio.com/user/account | |
string AccountSid = "AC58f1e8f2b1c6b88ca90a012a4be0c279"; | |
string AuthToken = "456bef"; | |
var twilio = new TwilioRestClient(AccountSid, AuthToken); |