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 branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d |
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
mongo DB_NAME --quiet --eval 'DBQuery.shellBatchSize = 2000; db.COLLECTION_NAME.find({}).limit(2000).toArray()' > collection.json |
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
+----------------------+------------+-----------------------+-----------------------+ | |
| if VARIABLE is: | set | empty | unset | | |
+----------------------+------------+-----------------------+-----------------------+ | |
- | ${VARIABLE-default} | $VARIABLE | "" | "default" | | |
= | ${VARIABLE=default} | $VARIABLE | "" | $(VARIABLE="default") | | |
? | ${VARIABLE?default} | $VARIABLE | "" | exit 127 | | |
+ | ${VARIABLE+default} | "default" | "default" | "" | | |
+----------------------+------------+-----------------------+-----------------------+ | |
:- | ${VARIABLE:-default} | $VARIABLE | "default" | "default" | | |
:= | ${VARIABLE:=default} | $VARIABLE | $(VARIABLE="default") | $(VARIABLE="default") | |
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
using System; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
namespace Helpers | |
{ | |
public static class StringFormatExtension | |
{ | |
// http://james.newtonking.com/archive/2008/03/27/formatwith-string-format-extension-method.aspx | |
public static string FormatWith(this string format, params object[] args) |
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 'gmail' | |
require 'open-uri' | |
require 'nokogiri' | |
product_url = "http://store.apple.com/ca/browse/home/specialdeals/mac/mac_mini" | |
username = 'GMAIL USER NAME' | |
password = 'PASSWORD, DUH!' | |
email = "[email protected]" | |
threshold = 600 # How much you would like to spend |
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
// 3-bit binary counter (since I only have 3 LEDs [^_-]) | |
// Counts from 1 to 7 | |
// Video: https://plus.google.com/116685752536817026018/posts/8BbTWriKykB | |
int led2 = 5; | |
int led1 = 4; | |
int led0 = 3; | |
void setup() { | |
pinMode(led0, OUTPUT); |