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
2001 A Space Odyssey | |
2012 | |
28 Days Later | |
28 Weeks Later | |
300 | |
500 Days of Summer | |
A Bug's Life | |
A Clockwork Orange | |
A Knight's Tale | |
Aeon Flux |
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 flash_running? | |
begin | |
`ps aux`.split("\n").find { |process| process.include? "Flash" }.match(/\w+\s*\d+\s*([\d.]+)\s*.*/)[1].to_i > 4 | |
rescue NoMethodError | |
false | |
end | |
end | |
def sample | |
results = [] |
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 flash_running? | |
`ps aux`.split("\n").find { |process| process.include? "Flash" }.match(/\w+\s*\d+\s*([\d.]+)\s*.*/)[1].to_i > 4 | |
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
// Welcome to hell... and the reason | |
// for the ability to embed variables | |
// in strings. Yes, this is effectively the | |
// same as just writing the damn thing out. | |
// And yes, I did generate this code - I'm not | |
// that insane. | |
outputBottleStatement(int numBottles) { | |
if (numBottles == 99) { | |
print("99 bottles of beer on the wall, 99 bottles of beer."); |
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 ruby | |
require 'digest/md5' | |
require 'net/http' | |
class String | |
def user_hash | |
Digest::MD5.hexdigest self.downcase | |
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
// VERY BAD | |
for (i = 0; i < MAC_LEN; i++) | |
{ | |
if (MAC_computed[i] != MAC_received[i]) | |
{ | |
return MAC_IS_BAD; | |
} | |
} | |
return MAC_IS_GOOD; |
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
// Run with: | |
// ./facedetect --cascade="/opt/local/share/opencv/haarcascades/haarcascade_frontalface_default.xml" 0 | |
// | |
// Remember to change the path of your xml file. | |
// | |
// OpenCV Sample Application: facedetect.c | |
// Include header files | |
#include "cv.h" | |
#include "highgui.h" |
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
require 'nibbler' | |
require 'open-uri' | |
CODE_RE = /[A-Za-z1-9]{4}-[A-Za-z1-9]{4}-[A-Za-z1-9]{4}/ | |
class String | |
[:gray, :red, :green, :yellow, :blue, :purple, :cyan, :white].each_with_index do |color, i| | |
define_method color do "\033[1;#{30+i}m#{self}\033[0m" end | |
define_method :"#{color}ish" do "\033[0;#{30+i}m#{self}\033[0m" 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
require 'nibbler' | |
require 'open-uri' | |
class SteamProfile < Nibbler | |
elements 'div.gameListRowItem' => :games do | |
element 'h4' => :title | |
element 'h5' => :playtime, :with => lambda { |time| | |
time.inner_text.strip.split(" ").first.to_f | |
} | |
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
[user] | |
name = Chris Brown | |
email = [email protected] | |
signingkey = D5E60FB1 | |
[github] | |
user = xoebus | |
token = [REDACTED] | |
[alias] | |
st = status | |
ci = commit |