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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Activity widget</title> | |
<style type="text/css"> | |
body { font-family: Helvetica; font-size: 12px; } | |
#note-list li { list-style: none; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px dotted #999; } | |
#note-list li span.avatar { padding-right: 10px; } |
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
function createExcerpt(str,maxwords){ | |
if(str) { | |
var excerpt = ''; | |
var words_arr = []; | |
str = str.replace(/^\s+|\s+$/g,""); //trims spaces from start and end of string | |
str = stripTags(str); | |
words_arr=str.split(' '); | |
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
# credit: http://news.ycombinator.com/item?id=1543915 | |
# in ipythonrc: | |
# execfile copy_and_paste.py | |
def copy(data): | |
from subprocess import Popen, PIPE | |
Popen(["xclip", "-selection", "clipboard"], stdin=PIPE).communicate(str(data)) | |
def paste(): |
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 -ex | |
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
# install ThinkUp on EC2 Ubuntu instance: | |
# | |
# @spara 12/23/10 | |
# @waxpancake 1/3/11 | |
# install required packages | |
sudo apt-get update |
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
djacobs-imac:~ djacobs$ traceroute staging-seriouseats.com | |
traceroute to staging-seriouseats.com (184.73.242.183), 64 hops max, 52 byte packets | |
1 10.0.1.1 (10.0.1.1) 0.875 ms 0.702 ms 0.975 ms | |
2 user-12ld0g1.cable.mindspring.com (69.86.130.1) 30.083 ms 9.112 ms 9.509 ms | |
3 gig-3-0-11-nycmnyg-rtr2.nyc.rr.com (24.29.151.221) 10.787 ms 30.626 ms 48.379 ms | |
4 pos-5-0-1-nycmnyg-rtr2.nyc.rr.com (24.29.151.114) 10.579 ms 33.264 ms 12.068 ms | |
5 ae5-nycsnyoo-rtr1.nyc.rr.com (24.29.148.70) 21.423 ms 14.024 ms 17.880 ms | |
6 ae-3-0.cr0.nyc20.tbone.rr.com (66.109.6.76) 14.327 ms 13.782 ms 16.063 ms | |
7 ae-0-0.pr0.nyc30.tbone.rr.com (66.109.6.159) 16.937 ms 62.665 ms 22.409 ms | |
8 xe-4-2-0.edge2.newark1.level3.net (4.59.20.157) 14.572 ms 12.443 ms 12.908 ms |
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
function domReady(callback) { | |
var domLoaded; | |
var called; | |
var onReadyStateChange = function () { | |
if (document.readyState == 'complete') { | |
domLoaded(); | |
} | |
}; |
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
# shebang | |
use constant USER => 'xxxx'; | |
use constant PASS => 'xxxx'; | |
# libraries | |
use CGI::PSGI; | |
use Data::Dumper; | |
use File::Glob qw(:globally :nocase); | |
use JSON; |
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
Apps installed... | |
Soulver | |
Textmate | |
Tinkertool | |
Xcode | |
Chrome | |
FaceTime | |
Evernote | |
Marsedit | |
Perian |
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
use strict; | |
use POSIX; | |
use bignum; | |
use constant DEBUG => 0; | |
my $count = 0; | |
my $x = 2 ** 1043; | |
my @s = split(//,$x."a"); |
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
use strict; | |
#use bigint; | |
use constant TARGET => 20; | |
use constant VERBOSE => 1; | |
my $total = 0; | |
my %fib; | |
sub fib($) |