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
# from http://fredkschott.com/post/2014/02/git-log-is-so-2005/ | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit" |
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
# Take an array [221,222,223,224] and turn it into {221 => 1, 222 => 1, 223 => 1, 224 => 1} | |
start = [221,222,223,224] | |
# My almost illegible implementation | |
result = Hash[*start.map(&:id).zip([1] * start.count)] |
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
*/1 * * * * PATH=$PATH:/usr/local/bin && bash -lc "ruby ~/bin/gitapi" | |
*/1 * * * * PATH=$PATH:/usr/local/bin && bash -lc "ruby /Users/ugorelik/bin/test" |
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
#!/system/bin/sh | |
iptables -A bw_FORWARD -i !lo+ | |
iptables -A natctrl_FORWARD -j RETURN -i rmnet+ -o wlan0 -m state --state RELATED,ESTABLISHED | |
iptables -A natctrl_FORWARD -j DROP -i wlan0 -o rmnet+ -m state --state INVALID | |
iptables -A natctrl_FORWARD -j RETURN -i wlan0 -o rmnet+ | |
iptables -A natctrl_FORWARD -j DROP | |
iptables -A natctrl_nat_POSTROUTING -t nat -o rmnet+ -j MASQUERADE |
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
str=gets | |
unless str.nil? && str != "" | |
puts str | |
else | |
puts "gets produced nil or didn't ask for input." | |
end |
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 | |
about | |
above | |
across | |
act | |
active | |
activity | |
add | |
afraid | |
after |
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
require 'httparty' | |
class Github | |
include HTTParty | |
base_uri "https://api.github.com" | |
BaseDirectory = "/Users/ugorelik/programming/repos" | |
def initialize(u, p) | |
@auth = { username: u, password: p} | |
load_bitbucket_repos |
NewerOlder