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
docker build --no-cache --force-rm -t python:2.7-jessie . | |
Sending build context to Docker daemon 7.168kB | |
Step 1/11 : FROM buildpack-deps:jessie | |
---> cb92533ca5cc | |
Step 2/11 : ENV PATH /usr/local/bin:$PATH | |
---> Running in 19223129a49c | |
---> d118a038cd5a | |
Removing intermediate container 19223129a49c | |
Step 3/11 : ENV LANG C.UTF-8 |
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/sh | |
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
if [ "`/usr/bin/whoami`" == "root" ]; then | |
echo "You should not execute this script as root." | |
exit 1 | |
fi | |
INSTALL_DIR="/tmp/ffmpeg-source" |
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 | |
GEMSETS=$(find ~/.rvm/gems -maxdepth 1) | |
VERSION_TO_REMOVE="1.10.6" | |
for i in ${GEMSETS[@]} | |
do | |
GEMSET=${i##*/} | |
if [[ $GEMSET == "gems" || $GEMSET == "cache" ]]; then | |
continue |
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
import random | |
def tally(votes): | |
max_score = 0 | |
max_ppv = 0 | |
winner = '' | |
for book, v in votes.items(): | |
score = sum([x*(v.index(x)+1) for x in v]) | |
ppv = 0 if not score else float(score) / sum(v) |
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
<?php | |
$domain_map = array( | |
'omg-facts.com' => 'omgfacts.com', | |
'sex.omg-facts.com' => 'sex.omgfacts.com', | |
); | |
if (array_key_exists($config['site_name'], $domain_map)) { | |
$config['site_name'] = $domain_map[$config['site_name']]; | |
} |
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
/** | |
* a simpler version of debug_backtrace() | |
* | |
* @param boolean $show_args Pass true to display argument values in the output | |
* @param boolean $expand_objects when $show_args == true, pass true to expand object values, default to false to avoid over-verbosity | |
* | |
*/ | |
function simple_backtrace( $show_args = false, $expand_objects = false ) | |
{ | |
$tracers = debug_backtrace(); |
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
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"ensure_newline_at_eof_on_save": true, | |
"find_selected_text": true, | |
"fold_buttons": false, | |
"folder_exclude_patterns": | |
[ |
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 | |
# | |
# Python | |
# | |
# This will install the latest python 2.x branch via | |
# Homebrew, install virtualenv and virtualenvwrapper packages | |
# globally via pip, then create a base virtual environment under | |
# the branch and install the packages in requirements.txt | |
# | |
# alternate version that does not depend on virtualenvwrapper is |
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
# Name your first "bootstrap" environment: | |
INITIAL_ENV=pymordial | |
# Options for your first environment: | |
ENV_OPTS='' | |
# Set to whatever python interpreter you want for your first environment: | |
PYTHON=$(type -P python) | |
# Latest virtualenv from pypa |