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
# Go up directory tree X number of directories | |
function up() { | |
COUNTER="$@"; | |
# default $COUNTER to 1 if it isn't already set | |
if [[ -z $COUNTER ]]; then | |
COUNTER=1 | |
fi | |
# make sure $COUNTER is a number | |
if [ $COUNTER -eq $COUNTER 2> /dev/null ]; then | |
nwd="`pwd`" # Set new working directory (nwd) to current directory |
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
[[ -s ~/.bashrc ]] && source ~/.bashrc | |
source ~/git-completion.bash |
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
/* Project 65 | |
* | |
* Bootstrap test | |
* | |
* From: coronax - http://coronax.wordpress.com/2012/11/11/running-in-circles/ | |
*/ | |
const int clock_pin = 3; | |
const int num_pins = 8; | |
/* address bus pins hooked to high byte of address bus */ |
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
/** | |
* This is a factory promise that uses $http | |
*/ | |
.factory('myFactory', ['$http', '$q', function($http, $q) { | |
var getData = function() { | |
var deferred = $q.defer(); | |
$http({method:"GET", url:"/index.php", cache: false}) | |
.success(function(data, status, headers, config) { | |
date = formatDate(headers('Date'), 4); | |
deferred.resolve(date); |
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
.factory('myFactory', ['$resource', function ($resource) { | |
return $resource('FEED_URL', { | |
callback: 'JSON_CALLBACK', | |
// URL parameter | |
form: 'json' | |
}, { | |
get: { | |
// Used to get resources from other domains and namespace multiple calls | |
method: 'JSONP', | |
// These are the ?<PARAM=VALUE>&... queries |
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
#!/bin/bash | |
if [[ $1 == *"?"* ]] | |
then | |
q='&' | |
else | |
q='?' | |
fi | |
cmd='curl '$1$q'timestamp='`date +%s`; | |
exec $cmd; |
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
{ | |
"entries": [ | |
{ | |
"title": "Fiscal cliffhanger: GOP going against public sentiment?", | |
"description": "MSNBC’s Thomas Roberts talks with Rep. Diane Black, R-Tenn., and the political power panel--Karen Tumulty of the Washington Post, Democratic strategist Karen Finney, and Republican strategist Robert Traynham--about fiscal cliff talks.", | |
"added": 1354862683000 | |
}, | |
{ | |
"title": "The impact of changing demographics in the south", | |
"description": "MSNBC’s Thomas Roberts talks with Atlanta Mayor Kasim Reed and the Rev. C.L. Bryant about the changing demographics in the south and how it could impact future elections.", |
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
#!/bin/python | |
word = 'odysseus' | |
wordpattern = [] | |
alphabet = {'a':0,'b':0,'c':0,'d':0,'e':0,'f':0,'g':0,'h':0,'i':0,'j':0,'k':0,'l':0,'m':0,'n':0,'o':0,'p':0,'q':0,'r':0,'s':0,'t':0,'u':0,'v':0,'w':0,'x':0,'y':0,'z':0} | |
def getWordPattern(word): | |
word.lower() | |
unique = 0 | |
occurances = [] |
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
#!/bin/python | |
text = \ | |
'''Sing in me, Muse, and through me tell the story | |
of that man skilled in all ways of contending, | |
the wanderer, harried for years on end, | |
after he plundered the stronghold | |
on the proud height of Troy. | |
He saw the townlands |
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
<html> | |
<head> | |
<title>Trithemius progressive key cipher table</title> | |
<meta charset="utf-8"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<style type="text/css"> | |
table { | |
border-collapse: collapse; | |
border: 2px black solid; | |
} |
OlderNewer