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
def profile_pic(email,size) | |
digest = Digest::MD5.hexdigest(email,size) | |
# we want to allow parallel downloads, | |
# but we don't want to bust caches | |
if(%w(0 1 2 3 4 5 6 7).include? digest[0]) | |
host = "img0" | |
else | |
host = "img1" | |
end | |
return "http://" + host + ".lnkherd.com/avatar/" + digest + "?s=" + size + "&r=pg&d=retro" |
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
# Enable the partner repository and update apt | |
sudo add-apt-repository “deb http://archive.canonical.com/ natty partner” | |
sudo apt-get update | |
# Install Sun's Java VM | |
sudo apt-get install sun-java6-jre | |
# Set the default java and javaws binary | |
sudo update-alternatives --config java | |
sudo update-alternatives --config javaws |
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 'rubygems' | |
require 'sinatra' | |
require 'typhoeus' | |
require 'base64' | |
get '/' do | |
"hi" | |
end | |
# Now you can visit myserver.com/calendar1 and see your feeds! |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta lang="en-US"> | |
<% if !defined?(@page_title) %> | |
<title>In/Out</title> | |
<% else %> | |
<title>In/Out - <%= page_title %></title> | |
<% 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
<link rel="alternate" type="application/rss+xml" title="Adams Park" href="http://curbwise.com/adams-park/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Aksarben" href="http://curbwise.com/aksarben/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Barrington Park" href="http://curbwise.com/barrington-park/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Bel Air" href="http://curbwise.com/bel-air/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Bennington" href="http://curbwise.com/bennington/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Benson North" href="http://curbwise.com/benson-north/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Benson South" href="http://curbwise.com/benson-south/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Brookhaven" href="http://curbwise.com/brookhaven/rss" /> | |
<link rel="alternate" type="application/rss+xml" title="Burke" href="http://curbwise.com/burke/rss" /> | |
<link rel |
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
http://curbwise.com/adams-park/rss | |
http://curbwise.com/aksarben/rss | |
http://curbwise.com/barrington-park/rss | |
http://curbwise.com/bel-air/rss | |
http://curbwise.com/bennington/rss | |
http://curbwise.com/benson-north/rss | |
http://curbwise.com/benson-south/rss | |
http://curbwise.com/brookhaven/rss | |
http://curbwise.com/burke/rss | |
http://curbwise.com/candlewood/rss |
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
[{ | |
"_id": { | |
"$oid": "4ddc16698a21ee2f57000001" | |
}, | |
"description": "UNL student suffered minor lacerations to his back after a fall.", | |
"incident_number": "10000002", | |
"date": "01/01/2010", | |
"time": "03:13", | |
"building": "Delta Tau Delta", | |
"street": "", |
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 | |
# Basic for loop in bash | |
site_base="http://google.com/"; | |
site_suffix="/amazing_string"; | |
for (( i = 1; i <= 25; i++ )) | |
do | |
wget -q -A jpg $site_base$i$site_suffix; | |
done |
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 "rubygems" | |
require "crack" | |
require "json" | |
require "sinatra" | |
require "open-uri" | |
# (c)2011 Nate Benes | |
# Curbside JSON server | |
# | |
# This program is free software: you can redistribute it and/or modify |