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
[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: |
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
12:30 !irc.dysnomix.com *** CONNECT: Client connecting on port 6667: [email protected] [64.62.228.82] | |
[cpc8-stav15-2-0-cust111.aztw.cable.virginmedia.com] | |
12:30 !irc.dysnomix.com *** QUIT: Client exiting: [email protected] [Quit: http://www.mibbit.com ajax IRC Client] | |
(64.62.228.82) | |
12:31 !irc.dysnomix.com *** CONNECT: Client connecting on port 6667: [email protected] [207.192.75.252] | |
[cpc8-stav15-2-0-cust111.aztw.cable.virginmedia.com] | |
12:48 !irc.dysnomix.com *** QUIT: Client exiting: [email protected] [Quit: http://www.mibbit.com ajax IRC Client] | |
(207.192.75.252) | |
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
var server = net.createServer(function(stream) { // automatically binds to connection event | |
stream.on('data', function(data) { | |
map = JSON.parse(data.toString()); | |
console.log(map); | |
}); | |
}); |
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
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? |
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
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) |
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
'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 |
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
Show hidden characters
{ | |
"cmd": ["c:\\python27\\python.exe", "-u", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} |
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
## 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 |
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
## 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(): |
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
node "common" { | |
class { "apt": stage => first } | |
class { "deployer": stage => first } | |
class { "build-tools": stage => first, require => Class["apt"] } | |
include zsh | |
include vim | |
include sshd | |
} |
OlderNewer