- GitHub.com provides great public repository hosting.
- vanilla git over ssh works for simple project structures.
- gitosis works well where you'd like to use ssh pubkeys without shell access.
- gitolite works well where you'd like gitosis to have finer access control.
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 threading import Lock | |
def build_delegating_method(delegate_name, method_name): | |
def delegating_method(self, *a, **kw): | |
delegate = getattr(self, delegate_name) | |
method = getattr(delegate, method_name) | |
return method(*a, **kw) | |
doc_format = "Calls self.{}.{}." | |
delegating_method.__name__ = method_name |
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
# Print text to serial Epson printer. Escape codes are Epson ESC/POS. | |
# | |
# pip install pyserial jeni # Developed on Python 3.4. | |
import struct | |
import serial | |
from jeni import annotate, partial | |
from jeni import Injector |
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
import datetime as dt | |
import time | |
import requests # pip install requests | |
def get_ok(url): | |
"GET url and raise an exception if not 200 OK." | |
r = requests.get(url) | |
r.raise_for_status() |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.hostname = "scratch1" | |
config.vm.box = "ubuntu/trusty64" # vagrantcloud, use vagrant 1.5+ | |
# config.vm.box_url = "http://domain.com/path/to/above.box" |
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
@echo off | |
title Waiting to Launch Ventrilo | |
rem Delayed launch ventrilo, since it does not as executable in Startup. | |
rem Sleep for 60s using a dummy ping. | |
ping 127.0.0.1 -n 60 > nul | |
start "Ventrilo" "C:\Program Files\Ventrilo\Ventrilo.exe" -cHOST:PORT:PASSWORD |
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/sh | |
# Save as /etc/init.d/fancontrol | |
# update-rc.d fancontrol defaults 90 10 | |
# | |
# Based on /etc/init.d/skeleton | |
# Tested on a Supermicro 1U box running Ubuntu 10.04 x86_64. | |
### BEGIN INIT INFO | |
# Provides: fancontrol | |
# Required-Start: | |
# Required-Stop: |
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 | |
# usage: mirror-github <account_name> <project_name> | |
git clone --mirror git@github.com:${1}/${2}.git |
Sample prototyping schema for use with vanilla Apache Solr 1.4.1 download.
tar -xvzf ~/download/apache-solr-1.4.1.tgz
cd apache-solr-1.4.1/example/
vi solr/conf/schema.xml # edit into something like the schema here
java -jar start.jar # look for errors, otherwise have fun!
Start prototyping! To clean out the data index and start over, interrupt the Jetty server (Control-C) and:
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
description "Sync Dropbox web-based file share on local system." | |
author "Ron DuPlain <ron.duplain@willowtreeapps.com>" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [!2345] | |
respawn | |
env LANG=en_US.UTF-8 |
OlderNewer