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
<?php | |
date_default_timezone_set('GMT'); | |
$tim = strtotime("December 21"); | |
$fmt = SUNFUNCS_RET_STRING; | |
$lat = 90; | |
$lng = 0; | |
for($i = 0; $i<182; $i++) { | |
echo date(DATE_RFC822, $tim), "\t", | |
date_sunrise($tim, $fmt, $lat, $lng), " ", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
find ~/Projects/www.hugoschwyzer.net/ -type f \! -iname \*replyto\* -iname \*.html -exec lynx -nolist -dump {} \; > ~/hugo.corpus.txt | |
sed -e 's/http[^ ]*//g' -e 's/@[^ ]*//g' -e 's/^rt //i' ~/Projects/download-tweets/hugoschwyzer_tweets.csv >> ~/hugo.corpus.txt |
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
506 pyramid:~/Projects/kalibrate-rtl (master %)$ src/kal --h | |
kalibrate v0.4.1-rtl, Copyright (c) 2010, Joshua Lackey | |
modified for use with rtl-sdr devices, Copyright (c) 2012, Steve Markgraf | |
Usage: | |
GSM Base Station Scan: | |
kal <-s band indicator> [options] | |
Clock Offset Calculation: | |
kal <-f frequency | -c channel> [options] |
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
// | |
// Using CoreLocation on Mac OS X with command-line | |
// $ clang CoreLocationTest.m -framework cocoa -framework CoreLocation | |
// $ ./a.out | |
// location service enabled | |
// 2011-12-01 21:03:01.839 a.out[10214:903] latitude,logitude : 35.606647, 140.695538 | |
// 2011-12-01 21:03:01.842 a.out[10214:903] timestamp : 2011-12-01 21:01:36 +0900 | |
// tmiz [email protected] | |
// | |
#import <cocoa/cocoa.h> |
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
<?php | |
/** | |
* A controller plugin for protecting forms from CSRF | |
* | |
* Works by looking at the response and adding a hidden element to every | |
* form, which contains an automatically generated key that is checked | |
* on the next request against a key stored in the session | |
* | |
* @author Jani Hartikainen <firstname at codeutopia net> | |
*/ |
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/sh | |
# Usage: transmission-turtle [true|false] | |
ENDPOINT=http://localhost:9091 | |
CRED='admin:coolpassword' | |
################################################################################ | |
ENDPOINT=$ENDPOINT/transmission/rpc | |
HEADER=`curl -s -u "$CRED" -I $ENDPOINT | tr -d "\015" | egrep ^X-Transmission-Session-Id ` | |
curl -s -H "$HEADER" -u "$CRED" \ | |
$ENDPOINT -d "{\"method\": \"session-set\",\"arguments\":{\"alt-speed-enabled\":$1}}" | sed -e 's/.*:/ /g; s/["}]//g;' |
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
<?php | |
define('TEST_BASE_PATH', realpath(realpath(dirname(__FILE__)) . '/../library/Mmf/Test/')); | |
define('SCRIPT_PATH', realpath(dirname(__FILE__)) . '/CommitTest.php'); | |
echo SCRIPT_PATH,"\n"; | |
echo "This is SLOW!\n"; | |
$tmp = tempnam(sys_get_temp_dir(), "TestSuiteCoverage-"); | |
$path = TEST_BASE_PATH; | |
$files = explode("\n",`find $path -type f`); |
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/env python2.6 | |
# -*- coding: iso-8859-15 -*- | |
"""Calculate position for comet | |
Author: Kelsey Jordahl | |
Time-stamp: <Sun Feb 26 12:28:17 EST 2012> | |
License: GPLv3 | |
""" | |
import ephem |
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
lynx -dump http://en.wikipedia.org/wiki/List_of_United_States_Navy_ships | grep http://en.wikipedia.org/wiki/List_of_Un |sed 's/^.*\. //' | sed 's/#.*$//'| sort | uniq | xargs curl -s |grep '<i>' |sed 's#.*<i>##' | sed 's#</i>.*##' | sort |uniq | grep -v '>' |egrep [A-Z][a-z] | tee america.txtlynx -dump http://en.wikipedia.org/wiki/Category:Lists_of_ships_of_Italy | grep http://en.wikipedia.org/wiki/List_of_ |sed 's/^.*\. //' | sed 's/#.*$//'| sort | uniq | xargs curl -s |grep '<i>' |sed 's#.*<i>##' | sed 's#</i>.*##' | sort |uniq | grep -v '>' |egrep [A-Z][a-z] | tee italy.txt | |
sh -c 'lynx -dump http://en.wikipedia.org/wiki/Category:Lists_of_ships_of_Sweden ; lynx -dump http://en.wikipedia.org/wiki/Category:Ships_of_the_Finnish_Navy; lynx -dump http://en.wikipedia.org/wiki/Category:Lists_of_ships_of_Sweden ; lynx -dump http://en.wikipedia.org/wiki/Category:Ships_of_the_Royal_Norwegian_Navy; lynx -dump http://en.wikipedia.org/wiki/Category:Ships_of_Denmark' | grep http://en.wikipedia.org/wiki/List_of_ |se |