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
GREEN='0;32m' | |
YELLOW='1;33m' | |
PS1='[\u@\h \[\033[$GREEN\]\W\[\033[0m\]\[\033[$YELLOW\]$(__git_ps1 " (%s)")\[\033[0m\]]\$ ' |
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/ruby | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'rubygems' | |
IRB.conf[:USE_READLINE] = true | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history" | |
IRB.conf[:PROMPT_MODE] = :SIMPLE |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
REGISTER 's3n://intentmedia-hawk-output/paul/jars/jsonStorage.jar'; | |
DEFINE JsonStorage org.apache.pig.builtin.JsonStorage(); | |
-- Load up the million song dataset from S3 (see data spec at: http://bit.ly/vOBKPe) | |
songs = LOAD 's3n://tbmmsd/T.tsv.j' USING PigStorage('\t') AS ( | |
track_id:chararray, analysis_sample_rate:chararray, artist_7digitalid:chararray, | |
artist_familiarity:chararray, artist_hotness:double, artist_id:chararray, artist_latitude:chararray, | |
artist_location:chararray, artist_longitude:chararray, artist_mbid:chararray, artist_mbtags:chararray, | |
artist_mbtags_count:chararray, artist_name:chararray, artist_playmeid:chararray, artist_terms:chararray, |
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 | |
export DEBIAN_FRONTEND=noninteractive | |
cat >>/etc/apt/sources.list <<END | |
# Needed for older versions of libqt (needed for cucumber and capybara/webkit) | |
deb http://archive.ubuntu.com/ubuntu oneiric main | |
END | |
apt-get update | |
apt-get remove -y libqtwebkit-dev libqt4-dev |
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
#### Contents of the preconfiguration file (for squeeze) | |
### Localization | |
# Preseeding only locale sets language, country and locale. | |
d-i debian-installer/locale string en_US | |
# The values can also be preseeded individually for greater flexibility. | |
#d-i debian-installer/language string en | |
#d-i debian-installer/country string NL | |
#d-i debian-installer/locale string en_GB.UTF-8 | |
# Optionally specify additional locales to be generated. |
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 'net/http' | |
require 'json' | |
auth_token = '<put_the_auth_token_you_get_back_here>' | |
search_endpoint = 'http://localhost:5000/listing/' | |
login_endpoint = 'http://localhost:5000/login' | |
json = JSON.dump( | |
{ | |
"email"=>"foo@urbancompass.com", | |
"password"=>"password" |
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
# ---------------------- | |
#--- IPTABLES START --- | |
# ---------------------- | |
# | |
# DEFINES: | |
LAN_IP=$(nvram get lan_ipaddr) | |
WAN_IP=$(nvram get wan_ipaddr) | |
# --- |
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
2222222222222222222222222222222222222222222222222222222222222222222222222666666666666666666666666666666666666699999999999999999999999999999999999999999999996666666666666666666666666666666669999999999999999999999999999999999999666666666666666666666666666666666666666669999999999999999999999999999999999999966666666666666666666666666666666666666666669999999999999999999999955555555555555555555555444444444444444111111111111111111122222222222222222222222333333333333333333333333333344444444444444444444445555555555555555555555566666666666666666666664444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444477777777777777777777777777777777777777777777777778888888888888888888888888888888888888889999999999999999999999999899999999999999998999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999899999999999999999999999999999999999999999999999999999999999999999999999999999999999999991111111111111111111 |
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 foo(x): | |
return x | |
def reassign(y): | |
# Must have this line to tell the interpreter that you mean the outer 'foo' reference, not a new, locally scoped one. | |
global foo | |
if y: | |
foo = lambda x: x + 1 | |
else: | |
foo = lambda x: x - 1 |
OlderNewer