Skip to content

Instantly share code, notes, and snippets.

View parkan's full-sized avatar

Arkadiy Kukarkin parkan

View GitHub Profile
@parkan
parkan / faceboxgenders.txt
Last active August 29, 2015 13:57
facebox gender breakdown
male
----
model-002.jpg model-012.jpg model-023.jpg model-033.jpg model-045.jpg
model-003.jpg model-014.jpg model-025.jpg model-035.jpg model-047.jpg
model-004.jpg model-016.jpg model-026.jpg model-036.jpg model-049.jpg
model-006.jpg model-017.jpg model-027.jpg model-041.jpg model-050.jpg
model-007.jpg model-019.jpg model-031.jpg model-043.jpg
model-010.jpg model-021.jpg model-032.jpg model-044.jpg
female
@parkan
parkan / git-grep-blame.rb
Created August 14, 2014 21:33
Blame the output of a git-grep. Edited to work under ruby 2.1.X
#!/usr/local/bin/ruby
grep = `git grep -n #{ARGV[0]} #{ARGV[1]}`
interrupt = false
grep.split("\n").each do |file_with_line|
exit if interrupt
file, line_number, line = file_with_line.split(':', 3)
@parkan
parkan / gist:46e9057b49c4c835a148
Created October 6, 2014 17:30
twisted install failure (scrapy prereq)
[~]% pip install twisted (arkadiy@sodium:~)
Downloading/unpacking twisted
Downloading Twisted-14.0.2.tar.bz2 (4.3MB): 4.3MB downloaded
Running setup.py (path:/private/var/folders/sm/38kkrt9n5z5524hmxqn3h8yh0000gq/T/pip_build_arkadiy/twisted/setup.py) egg_info for package twisted
Downloading/unpacking zope.interface>=3.6.0 (from twisted)
Downloading zope.interface-4.1.1.tar.gz (864kB): 864kB downloaded
Running setup.py (path:/private/var/folders/sm/38kkrt9n5z5524hmxqn3h8yh0000gq/T/pip_build_arkadiy/zope.interface/setup.py) egg_info for package zope.interface
warning: no previously-included files matching '*.dll' found anywhere in distribution
@parkan
parkan / gist:e89f9d54533326ff94bd
Created December 5, 2014 17:57
Chromium contributor count
[0ff3a49...//src]% git remote -v (arkadiy@sodium:~/src/)
origin https://chromium.googlesource.com/chromium/src.git (fetch)
origin https://chromium.googlesource.com/chromium/src.git (push)
[0ff3a49...//src]% git shortlog -sn | wc -l (arkadiy@sodium:~/src/)
3385
@parkan
parkan / force.csv
Last active August 29, 2015 14:18 — forked from d3noob/.block
source target value
Harry Sally 100
Harry Sally 100
Harry Sally 100
Harry Mario 1.3
Sarah Alice 0.2
Eveie Alice 0.5
Peter Alice 1.6
Mario Alice 0.4
James Alice 0.6
@parkan
parkan / gist:0d75c363034db1ade31b
Last active August 29, 2015 14:24
Run a docker rails console container with heroku variables injected into ENV
# this replaces https://github.com/tpope/heroku-surrogate for docker containers (sort of)
docker-compose run `heroku config -a $APPNAME | tail +2 | tr -s " " | sed -E "s/^([^ ]+): (.+)/-e \1=\2/" | tr "\\n" " "` api rails c
@parkan
parkan / gist:6a4e74684feb828dddd6
Created July 13, 2015 16:53
onename verification
Verifying I am +arkadiy on my passcard. https://onename.com/arkadiy
@parkan
parkan / dc-aliases-zsh
Last active August 29, 2015 14:25
docker-compose aliases
b2d-shellinit(){
[ -z "$DOCKER_HOST" ] && $(boot2docker shellinit)
}
alias dc='b2d-shellinit; docker-compose'
alias dcr='b2d-shellinit; docker-compose run'
alias dcr-heroku='b2d-shellinit; docker-compose run `heroku config -a XXX-production | tail +2 | tr -s " " | sed -E "s/^([^ ]+): (.+)/-e \1=\2/" | tr "\\n" " "` api rails c'
alias dcr-heroku-staging='b2d-shellinit; docker-compose run `heroku config -a XXX-staging | tail +2 | tr -s " " | sed -E "s/^([^ ]+): (.+)/-e \1=\2/" | tr "\\n" " "` api rails c'
@parkan
parkan / pre-commit
Created November 11, 2010 20:10 — forked from sztanpet/pre-commit
php pre-commit lint that doesn't break on deleted files
#!php
<?php
$files = array();
exec('git diff-index --cached --diff-filter=ACMRTUXB --name-only HEAD', $files );
$exitcode = 0;
// dont redirect stderr to stdin, we will get the errors twice, redirect it to dev/null
if ( PHP_OS == 'WINNT' )
$redirect = ' 2> NUL';
else
#!/opt/perlbrew/perls/current/bin/perl
use utf8;
use strict;
use warnings;
use v5.16;
use Algorithm::Permute;
use Data::Validate::IP;