Skip to content

Instantly share code, notes, and snippets.

View parente's full-sized avatar
🦡

Peter Parente parente

🦡
View GitHub Profile
#!/bin/sh
set -e
gh="https://github.com/"
repos="
ipython/traitlets
ipython/ipython
jupyter/jupyter_core
# Make a new virtual env
# named ninjakitten
mkvirtualenv ninjakitten
cdvirtualenv
# Install readline binary
easy_install -a readline
# Install ipython
pip install -E . ipython
@superchink
superchink / show
Created April 20, 2011 22:42 — forked from tekacs/show
This does something essentially equivalent to showoff.io if you have a publicly facing server...
# Usage: show <local-port> <subdomain>
function show() {
DOMAIN=".webhostology.com"
REMOTE="$2$DOMAIN"
ssh -tR 8080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:8080 localhost"
}
@mshuler
mshuler / github-mirror.sh
Created November 23, 2010 01:33
example github mirror from launchpad
#!/bin/sh
# OpenStack bzr to github mirror
#
# Requirements:
# git >= 1.7.0, bzr >= 2.0.0,
# git-bzr-ng, python-fastimport, patched bzr-fastimport
#####
# Set up unpackaged source:
# mkdir ~/src
@millermedeiros
millermedeiros / build.xml
Created February 13, 2011 20:57
RequireJS optimizer Ant task
<?xml version="1.0" encoding="utf-8"?>
<project name="sample-require-js" default="" basedir=".">
<!-- properties -->
<property name="r.js" value="_build/rjs/r.js" />
<property name="closure.jar" value="_build/closure/compiler.jar" />
<property name="rhino.jar" value="_build/rhino/js.jar" />
<property name="js.build" value="_build/js.build.js" />
<property name="css.build" value="_build/css.build.js" />
@jakevdp
jakevdp / Jupyter_vs_Mathematica.ipynb
Created April 8, 2018 05:01
Jupyter vs Mathematica Google Trends
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ncode
ncode / gsdproxy.py
Created July 10, 2011 16:01
gevent simple dynamic reverse proxy
#!/usr/bin/env python
from gevent import monkey
monkey.patch_all()
import sys
import redis
import urllib2
import traceback
from cgi import escape
# -- gsdproxy
@nathanleclaire
nathanleclaire / machine.py
Created August 7, 2015 18:06
Ansible dynamic inventory plugin for Docker Machine
#!/usr/bin/env python
"""
Example Usage:
$ ansible -i machine.py machinename -m ping
"""
import argparse
import subprocess
@gmr
gmr / consul.lua
Created July 14, 2014 17:03
Dynamic Nginx upstream nodes using Consul
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""
@ericdill
ericdill / render_env.py
Last active October 20, 2021 20:22
Render the dependency graph for your conda environment (needs graphviz!)
import json
import glob
import os
from os.path import join, basename
# install this with "conda install -c conda-forge python-graphviz"
import graphviz as gv
# path to your conda environment
path = os.environ.get('CONDA_PREFIX')
if path is None: