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
main: main.o lib.o | |
gcc -o main main.o lib.o | |
main.o: main.c | |
gcc -c main.c | |
lib.o: lib.c | |
gcc -c lib.c |
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
#!/usr/local/bin/ruby | |
# Perhaps the most dangerous irc bot. | |
# To use it, edit the file to have the irc server and channel of your choice | |
# launch it with ruby. Don't worry about it. You should launch 2, just in case. | |
$version = 0.1 | |
require "socket" | |
#require 'lib/irc' | |
#require 'lib/general.rb' |
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
#!/usr/bin/ruby | |
$factoids = { | |
"ping" => "pong" | |
} | |
def get_factoid(channel, msg) | |
msg = msg.downcase | |
# if $factoids[msg].exists? | |
puts "Factoid: #{$factoid[msg]}" | |
send("PRIVMSG #{channel} #{$factoids[msg]}") | |
# end |
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
when /^:(.+?)!(.+?)@(.+?)\sPRIVMSG\s(.+)\s:!(.+)$/i | |
message = $5.split(" ") | |
puts message.join("|") if $DEBUG | |
body = global_process(message) | |
body = body.split("\n") | |
puts "$1 #{$1} $2 #{2} $3 #{$3} $4 #{$4} $5 #{$5}" | |
body.each do |b| | |
puts "B| #{b}" | |
send("PRIVMSG #{}") | |
end |
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
require 'date' | |
module Chronograph | |
class Timeline | |
include Enumerable | |
class Event < Struct.new(:name, :date, :desc) | |
attr_accessor :name, :date, :desc | |
def initialize(name, date, desc) | |
raise TypeError.new("date must be a date") unless date.is_a? Date |
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
require 'sinatra' | |
require 'mongoid' | |
configure do | |
Mongoid.configure do |config| | |
name = "url_shortener" | |
host = "localhost" | |
config.master = Mongo::Connection.new.db(name) | |
config.persist_in_safe_mode = false |
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
$ ghc mc2obj.hs | |
mc2obj.hs:10:0: | |
Failed to load interface for `ObjExport': | |
Use -v to see a list of the files searched for. | |
$ ghc ObjExport.hs | |
ObjExport.hs:63:17: | |
Couldn't match expected type `BC.ByteString' | |
against inferred type `bytestring-0.9.1.7:Data.ByteString.Internal.ByteString' |
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
int analogPin = 0; // potentiometer wiper (middle terminal) connected to analog pin 3 | |
// outside leads to ground and +5V | |
int writePin1 = 2; | |
int writePin2 = 3; | |
int writePin3 = 4; | |
int writePin4 = 5; | |
int writePin5 = 6; | |
int writePin6 = 7; | |
int val = 0; // variable to store the value read |
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
EV Nova pilot data dump | |
Output on 2/3/2012 at 5:37 PM | |
Game version: 1.1.1 | |
Plugins loaded: | |
none | |
Pilot name: Goroth Obarskyr |
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
#!/bin/bash | |
# Gotta get me some colors | |
echo "Updating package listing" | |
sudo apt-get update | |
echo "Installing packages" | |
sudo apt-get install -y curl git-core build-essential bison \ | |
openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev \ |
OlderNewer