This is a simple gist to illustrate the peculiar behavior with django 1.5 and DEBUG=False when running locally (and in production?...haven't gotten that far yet).
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
# from the bash prompt... | |
# starting from the directory that contains repositories X and Y, use 'hg convert --filemap' to find | |
# extract the content from path/to/dir in repository X and put it into a temporary repository TMP | |
echo 'include "path/to/dir"' > filemap.txt | |
hg convert --filemap.txt ./X ./TMP | |
# enter repository Y and do a "force pull" to pull in the changes from the temporary repository TMP | |
cd ./Y | |
hg pull -f ../TMP |
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
"""This gist demonstrates how to automatically authenticate with Facebook's OAuth2 | |
using fbconsole --- programmatically, without a browser --- and then count the number | |
of Posts, for example, on a Facebook Page. | |
""" | |
import fbconsole | |
import datetime | |
import time | |
# set up fbconsole |
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
python tools/install_paths \ | |
libdir=/usr/local/Cellar/meld/1.7.2/lib/meld \ | |
localedir=/usr/local/Cellar/meld/1.7.2/share/locale \ | |
helpdir=/usr/local/Cellar/meld/1.7.2/share/gnome/help/meld \ | |
sharedir=/usr/local/Cellar/meld/1.7.2/share/meld \ | |
< bin/meld > bin/meld.install | |
python tools/install_paths \ | |
libdir=/usr/local/Cellar/meld/1.7.2/lib/meld \ | |
localedir=/usr/local/Cellar/meld/1.7.2/share/locale \ | |
helpdir=/usr/local/Cellar/meld/1.7.2/share/gnome/help/meld \ |
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> | |
<title>d3.tip.js - Tooltips for D3</title> | |
<meta charset="utf-8" /> | |
<title>Example styles</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> | |
<script type="text/javascript" src="https://rawgithub.com/Caged/d3-tip/master/d3.tip.min.js"></script> | |
<style type="text/css"> | |
body { |
This demo demonstrates how to connect two adjascent <div>
s with
something that mimicks border-radius
behavior. The key is using the
:before
and :after
selectors to add a svg background image that
has the rounded corners.
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 | |
cd $(hg root) | |
for f in $(hg st -A | awk '{if($1!="I") print $2}'); do | |
# http://stackoverflow.com/a/4039466/564709 | |
t=$(hg log -l1 --template '{date|isodate}' $f | awk '{d=$1; gsub(/-/,"",d); t=$2; sub(/:/,"",t); printf("%s%s", d, t)}') | |
# http://stackoverflow.com/a/6839855/564709 |
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
"""Pipe the output of this script to another program to look at the CDF of the values. For example, | |
python random_numbers.py 1000 | sort -n | awk '{print $1, 1-(NR-1)/1000}' | xmgrace - | |
""" | |
import sys | |
import random | |
n = int(sys.argv[1]) | |
for i in xrange(n): |
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
sample_a.dat | |
sample_b.dat |
OlderNewer