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
| cd /usr/src/ | |
| wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3047_i386.deb | |
| dpkg -i sublime-text_build-3047_i386.deb |
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
| #!/usr/bin/perl | |
| # Restrict unsafe constructs | |
| use strict; | |
| # Config bits | |
| my $hostmaster = 'hostmaster.uk-noc.com'; | |
| my $auth_server = 'dns.uk-noc.com'; | |
| my $serial = '2012071800'; | |
| my @target_ips = ( |
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
| Facter.add(:mysql_version) do | |
| setcode do | |
| Facter::Util::Resolution.exec('mysql --version').chomp.split(' ')[4].gsub(',', '') | |
| end | |
| end |
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
| #!/usr/bin/python | |
| import urllib2 | |
| from BeautifulSoup import BeautifulSoup | |
| if __name__ == "__main__": | |
| try: | |
| response = urllib2.urlopen("https://www.cloudflare.com/wiki/index.php"\ | |
| "?title=What_are_the_CloudFlare_IP_address"\ | |
| "_ranges&action=render") | |
| except urllib2.HTTPError, e: |
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
| remove_action('rss_head', 'the_generator'); | |
| remove_action('rss2_head', 'the_generator'); | |
| remove_action('commentsrss2_head', 'the_generator'); | |
| remove_action('rdf_header', 'the_generator'); | |
| remove_action('atom_head', 'the_generator'); | |
| remove_action('comments_atom_head', 'the_generator'); | |
| remove_action('opml_head', 'the_generator'); | |
| remove_action('app_head', 'the_generator'); | |
| remove_action('wp_head', 'rsd_link'); | |
| remove_action('wp_head', 'wp_generator'); |
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 | |
| def valid_nick(nick): | |
| # We have to start with A-} | |
| if not re.match('^[\101-\173]', nick): | |
| return False | |
| # We can only contain A-}, 0-9 and - | |
| if not re.match('^[\101-\1730-9\-]+$', nick): | |
| return False |
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
| ALTER TABLE reports ADD FOREIGN KEY (revertid) REFERENCES vandalism(id) on delete CASCADE |
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
| from django.db import models | |
| class DeviceA(object): | |
| def do_something(self, string='Hello'): | |
| print "Device A something '%s'" % string | |
| def do_something_else(self): | |
| print "Device A something else" | |
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
| #!/usr/bin/env python | |
| import time | |
| import re | |
| import socket | |
| from pysnmp.entity.rfc3413.oneliner import cmdgen | |
| cmdGen = cmdgen.CommandGenerator() | |
| CARBON_IP = '10.44.206.51' | |
| CARBON_PORT = 2030 |
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 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets | |
| 1 10.44.200.254 (10.44.200.254) 5.057 ms 3.215 ms 4.460 ms | |
| 2 host-2-97-96-1.as13285.net (2.97.96.1) 95.907 ms 31.328 ms 30.944 ms | |
| 3 host-78-151-225-101.static.as13285.net (78.151.225.101) 32.417 ms 32.150 ms 32.657 ms | |
| 4 host-78-151-225-26.static.as13285.net (78.151.225.26) 33.414 ms | |
| host-78-151-225-108.static.as13285.net (78.151.225.108) 32.723 ms | |
| host-78-151-225-26.static.as13285.net (78.151.225.26) 33.472 ms | |
| 5 xe-11-1-0-rt001.the.as13285.net (62.24.240.6) 38.430 ms 39.111 ms | |
| xe-11-1-0-rt001.sov.as13285.net (62.24.240.14) 39.522 ms | |
| 6 host-78-144-1-61.as13285.net (78.144.1.61) 38.020 ms |