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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "net" | |
| "net/http" | |
| "os" | |
| "sort" | |
| "strconv" |
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
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |
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 String | |
| def to_bool | |
| case | |
| when self == true || self =~ /^(true|t|yes|y|1)$/i | |
| true | |
| when self == false || self.blank? || self =~ /^(false|f|no|n|0)$/i | |
| false | |
| else | |
| raise ArgumentError.new "invalid value for Boolean: '#{self}'" |
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
| public static int colorBlend(final int c1, final int c2) { | |
| return ((c1 & 0xfefefefe) >> 1) + ((c2 & 0xfefefefe) >> 1) + (c1 & c2 & 0x01010101); | |
| } |
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
| # Settings courtesy internet | |
| # Bind C-a (Ctrl+a) to default action on tmux | |
| set-option -g prefix C-a | |
| unbind C-b | |
| # Command sequence for nested tmux when running tmux inside another tmux, you | |
| # need to send command to inner tmux | |
| bind-key a send-prefix |
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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Node struct { | |
| Value int | |
| } |
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 String | |
| def to_bool | |
| return true if self == true || self =~ (/(true|t|yes|y|1)$/i) | |
| return false if self == false || self.blank? || self =~ (/(false|f|no|n|0)$/i) | |
| raise ArgumentError.new("invalid value for Boolean: \"#{self}\"") | |
| end | |
| end |
As configured in my dotfiles.
start new:
tmux
start new with session name: