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
l10nxyn1:~ Salvation$ ping 198.61.228.45 | |
PING 198.61.228.45 (198.61.228.45): 56 data bytes | |
64 bytes from 198.61.228.45: icmp_seq=0 ttl=54 time=67.188 ms | |
64 bytes from 198.61.228.45: icmp_seq=1 ttl=54 time=64.764 ms | |
64 bytes from 198.61.228.45: icmp_seq=2 ttl=54 time=65.790 ms | |
64 bytes from 198.61.228.45: icmp_seq=3 ttl=54 time=71.223 ms | |
64 bytes from 198.61.228.45: icmp_seq=4 ttl=54 time=193.407 ms | |
64 bytes from 198.61.228.45: icmp_seq=5 ttl=54 time=330.236 ms | |
64 bytes from 198.61.228.45: icmp_seq=6 ttl=54 time=303.370 ms | |
Request timeout for icmp_seq 7 |
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
traceroute to 198.61.228.45 (198.61.228.45), 64 hops max, 52 byte packets | |
1 aggr1.vlan125.iad1.rackspace.com (69.20.0.34) 57.164 ms 51.031 ms 49.166 ms | |
2 core1-aggrit1.iad1.rackspace.com (69.20.1.158) 46.327 ms 79.258 ms 47.808 ms | |
3 coreb-core1.iad3.rackspace.net (69.20.2.100) 46.779 ms 47.771 ms 50.264 ms | |
4 coreb-edge1.iad3.rackspace.net (69.20.2.119) 46.569 ms 47.531 ms 46.227 ms | |
5 69.20.3.7 (69.20.3.7) 48.235 ms 47.161 ms 48.320 ms | |
6 10.25.0.65 (10.25.0.65) 64.450 ms 65.117 ms | |
10.25.0.69 (10.25.0.69) 65.756 ms | |
7 50.56.6.228 (50.56.6.228) 67.462 ms 65.318 ms 67.269 ms | |
8 coreb.ord1.rackspace.net (184.106.126.138) 65.009 ms |
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
import re | |
address = re.compile( | |
r''' | |
# The regular name | |
(\w+) # first name | |
\s+ | |
(([\w.]+)\s+)? # optional middle name or initial | |
(\w+) # last name |
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
import re | |
address = re.compile( | |
''' | |
# The regular name | |
(?P<first_name>\w+) | |
\s+ | |
(([\w.]+)\s+)? # optional middle name or initial | |
(?P<last_name>\w+) |
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
import re | |
divine_comedy = """ | |
Test word universe should not match. | |
*** START *** | |
His glory, by whose might all things are mov'd, | |
Pierces the universe, and in one part | |
One more universe. |
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
import re | |
re.compile( | |
''' | |
(\d{3}) # Search for 3 digits and group them. | |
\D* # Followed by 0 or more non digit characters. | |
(\d{3}) # Followed by 3 digits grouped. | |
\D* # Followed by 0 or more non digit characters. | |
(\d{4}) # Followed by 4 digits grouped. |
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
def hello(): | |
print 'Hello!' | |
def area_rectangle(width, height): | |
return width * height | |
def area_square(side): | |
return side*side |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
import subprocess | |
import statsd | |
import re | |
import argparse | |
parser = argparse.ArgumentParser(description='Send num processes to StatsD') | |
parser.add_argument('servername', metavar='S', type=str, | |
help='The server that is generating this process list.') | |
args = parser.parse_args() |
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
class TweetSearch < ActiveRecord::Base | |
attr_accessible :status, :tweet_id, :user | |
def self.query(search_item="pizza") | |
starttime = Time.now | |
result = Twitter.search(search_item, :count => 10, :result_type => "recent").results.first | |
tweettime = ((Time.now - starttime) * 1000).to_i | |
METRICS.timing('tweetsearch.query', tweettime) | |
return result | |
end |
OlderNewer