Skip to content

Instantly share code, notes, and snippets.

@coordt
coordt / fabfile.py
Created Dec 1, 2010
A Fabric fabfile that allows you to check which packages are not like the others on a set of servers.
View fabfile.py
from __future__ import with_statement
from fabric.api import env, run, settings, hide
from fabric.decorators import hosts, runs_once
venv = "/home/websites/.virtualenvs/twtv3/"
env.user = 'webdev'
env.hosts = [
'192.168.1.10',
'192.168.1.11',
@ptone
ptone / _webfaction_setup.rst
Created Apr 4, 2011
setting up a stack on webfaction
View _webfaction_setup.rst

Setting up Webfaction for modern Django deployment

last updated: 4/5/2011

note that this stuff is always a moving target, much of this has been cribbed and combined from various blog posts. Much of the information was out of date from those, and if it is more than a couple months after the last updated date above, consider some of this likely to now be out of date.

@mihow
mihow / nginx-1.0.0-installer.py
Created Apr 23, 2011 — forked from robflaherty/nginx-0765-installer.txt
Nginx 1.0.0 installer for Webfaction
View nginx-1.0.0-installer.py
-----BEGIN WEBFACTION INSTALL SCRIPT-----
#!/bin/env python2.6
VERSION = "1.0.0"
"""
Nginx Installer
"autostart": not applicable
"extra info": Enter domain name for the nginx app
@mihow
mihow / _webfaction_setup.rst
Created Apr 26, 2011 — forked from ptone/_webfaction_setup.rst
setting up a stack on webfaction
View _webfaction_setup.rst

Setting up Webfaction for modern Django deployment

last updated: 4/5/2011

note that this stuff is always a moving target, much of this has been cribbed and combined from various blog posts. Much of the information was out of date from those, and if it is more than a couple months after the last updated date above, consider some of this likely to now be out of date.

@darkopetrovic
darkopetrovic / gist:11292725
Created Apr 25, 2014
Datalog and stream light sensor and voltage reading from ADC with Raspberry PI to Plot.ly
View gist:11292725
#!/usr/bin/python
import os, time, signal, sys
from Adafruit_ADS1x15 import ADS1x15
import RPi.GPIO as GPIO
from datetime import datetime
import subprocess
import argparse
import requests
import json
@DeveloperPaul123
DeveloperPaul123 / DMX_ETH_17_Motor.cpp
Created Sep 19, 2016
Arcus Ethernet Motor Class based on QT
View DMX_ETH_17_Motor.cpp
/**
* Constructor. Miscellaneous initilization of some variables.
*/
DMX_ETH_17_Motor::DMX_ETH_17_Motor() {
isConnected = false;
mSocket = new QTcpSocket();
}
/**
* Returns whether or not the motor is connected.
View README.md

First install the required gems:

gem install octokit awesomeprint rainbow

Then run it to extract all of your open GitHub issues into files (with comments).

ruby my-gh-issues.rb
@mbostock
mbostock / .block
Last active Feb 26, 2019
Horizon Chart
View .block
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-horizon-chart
@igniteflow
igniteflow / middleware.py
Created Mar 11, 2014
Django language middleware. Detect the user's browser language settings and activate the language. If the default language is not supported, try secondary options. If none of the user's languages are supported, then do nothing.
View middleware.py
class LanguageMiddleware(object):
"""
Detect the user's browser language settings and activate the language.
If the default language is not supported, try secondary options. If none of the
user's languages are supported, then do nothing.
"""
def is_supported_language(self, language_code):
supported_languages = dict(settings.LANGUAGES).keys()
return language_code in supported_languages
@awesomebytes
awesomebytes / reduce_faces.py
Created Apr 6, 2016
Executing meshlab from commandline reduce faces of a mesh iteratively
View reduce_faces.py
#!/usr/bin/env python
import sys
import os
import subprocess
# Script taken from doing the needed operation
# (Filters > Remeshing, Simplification and Reconstruction >
# Quadric Edge Collapse Decimation, with parameters:
# 0.9 percentage reduction (10%), 0.3 Quality threshold (70%)