brew install irssi
brew install loudmouth
git clone git@github.com:weiss/irssi-xmpp.git
cd irssi-xmpp
LDFLAGS='-flat_namespace -undefined warning -fPIC'; export LDFLAGS
make PREDIX=/usr/local/Cellar/irssi/0.8.15
make user-install
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 ls-files | | |
| while read f; do | |
| echo $f > /dev/tty; git blame $f | | |
| grep -o "\d\{4\}-"; | |
| done | | |
| sort -f | | |
| uniq -ic | | |
| sort -n |
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
| for i in *.jpg | |
| do | |
| jhead -n"%Y-%m-%d %H.%M.%S" $i | |
| 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
| require 'benchmark/ips' | |
| string_hash = { 'aaa' => 1, 'bbb' => 2, 'ccc' => 3 } | |
| symbol_hash = { aaa: 1, bbb: 2, ccc: 3 } | |
| Benchmark.ips do |x| | |
| x.report('string') { string_hash['bbb'] } | |
| x.report('symbol') { symbol_hash[:bbb] } | |
| x.compare! |
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 'benchmark/ips' | |
| require 'set' | |
| ARRAY = [:integer, :float, :decimal] | |
| SET = ARRAY.to_set | |
| type = :decimal | |
| Benchmark.ips do |x| | |
| x.report('array') { [:integer, :float, :decimal].include?(type) } | |
| x.report('or') { type == :integer || type == :float || type == :decimal } |
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
| SELECT table_name, round(((data_length + index_length) / 1024 / 1024), 2) AS size | |
| FROM information_schema.TABLES | |
| WHERE table_schema = "SCHEMA" | |
| ORDER BY size DESC LIMIT 20; |
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
| #!/bin/bash | |
| for i in {0..24} | |
| do | |
| ii=$(($i + 1)) | |
| fixes=`git log --since="${ii} months ago" --until="${i} months ago" | grep -i fix | wc -l` | |
| committers=`git log --since="${ii} months ago" --until="${i} months ago" --pretty=format:"%an" | sort -u | wc -l` | |
| echo `bc -l <<< "${fixes} / ${committers}"` |
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
| gifit() { | |
| if [[ -n "$1" ]]; then | |
| ffmpeg -i $1 -s 600x375 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=5 > $1.gif | |
| else | |
| echo "proper usage: gifit <input_movie.mov>" | |
| 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
| for t in `git tag` | |
| do | |
| if [[ ${#t} -lt 20 ]]; then | |
| echo keeping $t | |
| else | |
| git push origin :$t | |
| git tag -d $t | |
| fi | |
| 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
| lines = File.readlines('vilniusjs_emails') | |
| result = [] | |
| remove = false | |
| lines.each do |line| | |
| if line.strip.empty? | |
| remove = true | |
| end |