Skip to content

Instantly share code, notes, and snippets.

View kalefranz's full-sized avatar

Kale Franz kalefranz

  • Anaconda, Inc.
  • Austin, TX
View GitHub Profile
@insin
insin / gulpfile.js
Created November 8, 2014 21:14
Watch and rebuild Sphinx docs with Gulp
var gulp = require('gulp')
var shell = require('gulp-shell')
gulp.task('build-docs', shell.task('make html', {cwd: './docs'}))
gulp.task('docs', ['build-docs'], function() {
gulp.watch(['./docs/*.rst', './docs/*.py'], ['build-docs'])
})
@naftaliharris
naftaliharris / trypy
Last active January 2, 2016 09:39
An enhancement to the "python" executable that automatically launches you into a debugger if your code throws an exception.
#!/bin/bash
# An enhancement to the "python" executable that automatically launches you into the python debugger on error.
#
# Use it like you would the "python" executable, for example:
# $ trypy somefile.py
# or
# $ trypy somefile.py arg1 arg2
#
# EXAMPLE:
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@esc
esc / anaconda.sh
Last active October 8, 2018 21:06
Anconda activation and deactivation functions for ZSH
# Functions to activate/deactivate Continuum Analytics Anaconda Python distribution
# by manipulating the $PATH.
export ANACONDA_PATH="$HOME/anaconda/bin"
function have_anaconda(){
[[ -n $path[(r)$ANACONDA_PATH] ]]
}
function anaconda_on(){
if have_anaconda ; then
anonymous
anonymous / bash-throbber.sh
Created September 4, 2012 14:31
bash throbber
#!/usr/bin/env bash
C="0" # count
while [ $C -lt 20 ]
do
case "$(($C % 4))" in
0) char="/"
;;
1) char="-"
;;
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@codysoyland
codysoyland / post-checkout
Created January 18, 2011 20:19
place in .git/hooks/post-checkout to delete empty directories and pyc files
#! /bin/sh
echo "Purging pyc files and empty directories..."
# Start from the repository root.
cd ./$(git rev-parse --show-cdup)
# Delete .pyc files and empty directories.
find . -name "*.pyc" -delete 2>&1 > /dev/null &
find . -type d -empty -delete 2>&1 > /dev/null &