Skip to content

Instantly share code, notes, and snippets.

View adamancini's full-sized avatar

ada mancini adamancini

View GitHub Profile
[adalgiso@trogdor-lin:~] % sudo apt-get purge firefox
[sudo] password for adalgiso:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
songbird
The following packages will be REMOVED:
abrowser*
The following NEW packages will be installed:
@adamancini
adamancini / gist:1201094
Created September 7, 2011 16:54
Phisher
12:30 !irc.dysnomix.com *** CONNECT: Client connecting on port 6667: Skinnyjeanius!4d647470@ircip2.mibbit.com [64.62.228.82]
[cpc8-stav15-2-0-cust111.aztw.cable.virginmedia.com]
12:30 !irc.dysnomix.com *** QUIT: Client exiting: Skinnyjeanius!4d647470@ircip2.mibbit.com [Quit: http://www.mibbit.com ajax IRC Client]
(64.62.228.82)
12:31 !irc.dysnomix.com *** CONNECT: Client connecting on port 6667: skinnyjeanius!4d647470@ircip1.mibbit.com [207.192.75.252]
[cpc8-stav15-2-0-cust111.aztw.cable.virginmedia.com]
12:48 !irc.dysnomix.com *** QUIT: Client exiting: skinnyjeanius!4d647470@ircip1.mibbit.com [Quit: http://www.mibbit.com ajax IRC Client]
(207.192.75.252)
var server = net.createServer(function(stream) { // automatically binds to connection event
stream.on('data', function(data) {
map = JSON.parse(data.toString());
console.log(map);
});
});
import logging
from Snap import snap
log = logging.getLogger('SimplyHomeBaseStation')
import json
import urllib2
import sys
basestationId = 2 # to be specified in config.yaml?
url = "http://dev.simplyhomeclient.com/events.json" # to be specified in config.yaml?
class Event < ActiveRecord::Base
attr_accessible :base_station_id, :data, :data_type, :device_id
validates :base_station_id, :presence => true
validates :device_id, :presence => true
validates :data_type, :presence => true
belongs_to :base_station
belongs_to :device
def method_missing(id, *args, &block)
if data.has_key?(id.to_s)
data.fetch(id.to_s)
'Get the current fiscal year
Function strGetYear() As String
Dim stryear1 As String
Dim stryear2 As String
Dim n As Integer
Dim nn As Integer
Dim nnn As Integer
Dim nnnn As Integer
@adamancini
adamancini / Python.sublime-build
Created September 17, 2012 17:20
python.sublime-build
{
"cmd": ["c:\\python27\\python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
@adamancini
adamancini / gist:3740163
Created September 17, 2012 22:25
euler5
## euler5
def euler5(upperBound):
smallest = 20
done = False
while not done:
for x in range(2,upperBound+1):
if smallest % x != 0:
smallest += upperBound
break
## euler9
# import euler9
# will give you access to the euler9 function from other scripts
# and wrapping everything else in a main() function and putting it
# after the if __name__ block will keep that code from being executed
# if the file is simply imported.
def euler9():
@adamancini
adamancini / nodes.pp
Created October 8, 2012 15:26
Puppet Nodes
node "common" {
class { "apt": stage => first }
class { "deployer": stage => first }
class { "build-tools": stage => first, require => Class["apt"] }
include zsh
include vim
include sshd
}