Skip to content

Instantly share code, notes, and snippets.

View shaiguitar's full-sized avatar
💭
We can pickle that

Shai Rosenfeld shaiguitar

💭
We can pickle that
View GitHub Profile
@shaiguitar
shaiguitar / imdb_get_dir.rb
Last active August 29, 2015 14:21
Got a huge dir of movies, wants to know what movie to see according to IMDB ratings.
require 'uri'
def safe_comparison(matrix)
matrix.map do |row|
row.map do |el|
el = el.to_s
end
end
end
@shaiguitar
shaiguitar / charlie-you-the-man.ly
Last active August 29, 2015 14:22
Charlie Christian Guitar Solo in Lilypond format
%{
Lilypond notation for Christian's guitar solo on https://www.youtube.com/watch?v=mOnhcdAMInA
%}
\header{
title = "Christian Charlie 7/11 solo"
}
@shaiguitar
shaiguitar / ruby-hash-access-in-string.txt
Created August 24, 2015 16:44
ruby-hash-access-in-string
irb(main):001:0> foo = "i like food"
=> "i like food"
irb(main):002:0> foo["food"] = "beer"
=> "beer"
irb(main):003:0> foo
=> "i like beer"
ey00-s00005
ey00-s00012
ey00-s00013
ey00-s00045
ey00-s00081
ey00-s00082
ey00-s00116
ey00-s00117
ey00-s00164
ey00-s00166
Last login: Tue Mar 30 13:03:45 on ttys004
Foobar! You've reached the mabac jiggity jack jack
You have mail.
shai@comp ~: $ traceroute 67.219.150.148
traceroute to 67.219.150.148 (67.219.150.148), 64 hops max, 40 byte packets
1 10.0.0.6 (10.0.0.6) 2.384 ms 1.922 ms 1.830 ms
2 10.218.24.1 (10.218.24.1) 10.235 ms 10.297 ms 10.028 ms
3 agr2-hfa-vlan363-hot.nv.net.il (207.232.0.154) 21.302 ms 18.398 ms 17.852 ms
4 agr2-hfa-vlan363-hot.nv.net.il (207.232.0.154) 17.453 ms 17.283 ms 18.064 ms
5 * erx1.hfa.nv.net.il (212.143.8.164) 18.711 ms *
Last login: Tue Mar 30 12:40:46 on ttys001
Foobar! You've reached the mabac jiggity jack jack
You have mail.
shai@comp ~: $ eyssh -vvv kg00-s00044
OpenSSH_5.2p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/shai/.ssh/ey.config
debug1: Applying options for *
debug1: Applying options for kg00-s00044
debug2: ssh_connect: needpriv 0
debug1: Connecting to 67.219.150.148 [67.219.150.148] port 8044.
My traceroute [v0.73]
Shai-Rosenfelds-MacBook-2.local (0.0.0.0) Tue Mar 30 13:08:27 2010
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. 10.0.0.6 0.0% 69 1.6 1.8 1.5 6.1 0.6
2. 10.218.24.1 0.0% 69 9.0 11.8 7.8 90.3 10.1
3. 207.232.0.154 0.0% 69 17.3 20.3 15.5 128.3 14.1
4. 207.232.0.154 1.4% 69 17.4 20.4 15.8 117.4 13.3
5. 212.143.8.164
Last login: Tue Mar 30 12:40:46 on ttys001
Foobar! You've reached the mabac jiggity jack jack
You have mail.
shai@comp ~: $ eyssh -vvv kg00-s00044
OpenSSH_5.2p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/shai/.ssh/ey.config
debug1: Applying options for *
debug1: Applying options for kg00-s00044
debug2: ssh_connect: needpriv 0
debug1: Connecting to 67.219.150.148 [67.219.150.148] port 8044.
Last login: Tue Mar 30 12:41:09 on ttys004
Foobar! You've reached the mabac jiggity jack jack
You have mail.
shai@comp ~: $ eyssh -vvv kg00-s00044
OpenSSH_5.2p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/shai/.ssh/ey.config
debug1: Applying options for *
debug1: Applying options for kg00-s00044
debug2: ssh_connect: needpriv 0
debug1: Connecting to 67.219.150.148 [67.219.150.148] port 8044.
ey03-s00282 ~ # ps aux|grep cron
root 3675 0.0 0.0 16296 324 ? Ss Mar15 0:05 /usr/sbin/cron
root 7513 0.0 0.0 24820 564 ? S 20:55 0:00 /usr/sbin/cron
1000 7514 0.0 0.0 8948 1044 ? Ss 20:55 0:00 /bin/sh -c /engineyard/bin/cron_wrapper ausbiziphone adserver_healthchecker production 'rake adserver:start'
root 7515 0.0 0.0 24820 564 ? S 20:55 0:00 /usr/sbin/cron
1000 7516 0.0 0.0 8952 1044 ? Ss 20:55 0:00 /bin/sh -c /engineyard/bin/cron_wrapper newsiphone adserver_healthchecker production 'rake adserver:start'
root 7869 0.0 0.0 24820 564 ? S 21:00 0:00 /usr/sbin/cron
1000 7871 0.0 0.0 8952 1044 ? Ss 21:00 0:00 /bin/sh -c /engineyard/bin/cron_wrapper ausbiziphone adserver_healthchecker production 'rake adserver:start'
root 7872 0.0 0.0 24820 564 ? S 21:00 0:00 /usr/sbin/cron
1000 7873 0.0 0.0 8952 1044 ? Ss 21:00 0:00 /bin/s