go run server.go
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
#!/bin/bash | |
# USAGE: ./all_shortlogs.sh ~/dev | |
STARTDIR=`pwd`; | |
cd $1; | |
ls | while read i; do # For each repo name in the given directory | |
cd $1/$i; | |
echo $i; # Print the repo name | |
git shortlog -sn origin/master 2>/dev/null | # ignore repos which have no origin/master branch | |
head -n 5; # output the top 5 names from the shortlog. | |
done; |
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
#!/bin/bash | |
for i in {1..100}; do | |
curl www.google.com 2>/dev/null 1>/dev/null && break || | |
sudo ifconfig en0 down && | |
sleep 1 && | |
sudo ifconfig en0 up && | |
sleep 4; | |
done |
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
#!/bin/bash | |
export bucket_name=pim-assets-production; | |
export AWS_ACCESS_KEY_ID=AKIAIPA6HVGVFP72TIQA; | |
echo -n "x-amz-acl: public-read" > ./aclheader; | |
ls ./s3.secret ~/Downloads/manifest.html #./s3.secret ~/Downloads/manifest.html | |
# The 0.02 version from google code does not properly parse the aclheader files. | |
./s3-put -v -c text/html -k $AWS_ACCESS_KEY_ID -a ./aclheader -s ./s3.secret -T ~/Downloads/manifest.html /$bucket_name/scratch/tim/manifest.html |
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
## tsnow: double comments added for clarity. | |
## Pull down the most recent changes to the repository. | |
~/dev/pim$ git fetch origin | |
remote: Counting objects: 120, done. | |
remote: Compressing objects: 100% (117/117), done. | |
remote: Total 120 (delta 20), reused 29 (delta 1) | |
Receiving objects: 100% (120/120), 302.27 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (20/20), done. | |
From github.com:ridecharge/pim |
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
gem install github_api; ruby -rgithub_api -e 'g=Github.new(:basic_auth => %(USERNAME:PASSWORD)); puts g.repos.list.map{|i| g.repos.commits.list(:repo => i.name, :author => %(USERNAME), :user => i.owner.login).map{|j| j.commit.message }}' |
http://golang.org/src/pkg/runtime/chan.c#L868
hg clone https://code.google.com/p/go/;
cd go;
hg log --template "{rev} {date|isodate}\n" -f src/pkg/runtime/chan.goc | tail -r | \
while read i d _ __; do hg log -r $i -p > $d-$i.diff; done
Uses https://github.com/tsnow/ruby-geometry
For: https://github.com/ridecharge/rc/pull/779
INSTALL: gem 'ruby-geometry', :git => 'https://github.com/tsnow/ruby-geometry.git'
BB=RGeo::Cartesian::BoundingBox.create_from_geometry(Zone.last.area);
def BB.each_square(step)
(BB.min_y .. BB.max_y).step(step){|y|
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
source 'https://rubygems.org' | |
gem 'yajl-ruby' |
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
# A | |
class Concrete | |
class << self | |
def my_method | |
end | |
end | |
end | |
#B | |
class Concrete |