Skip to content

Instantly share code, notes, and snippets.

View nloadholtes's full-sized avatar
👍
here

Nick Loadholtes nloadholtes

👍
here
View GitHub Profile
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@levelsio
levelsio / levelsio-by.html
Last active March 10, 2021 05:20
Maker Link (aka the @levelsio by link)
<!-- Maker Link by @levelsio -->
<!-- MIT License -->
<style>
body {
background:#333;
}
.levelsio-by {
font-family:"Helvetica Neue",sans-serif;
right:0;
@mzedeler
mzedeler / .bashrc_ssh
Last active March 11, 2020 19:02 — forked from bluegraybox/.bashrc_ssh
bashrc snippet for initializing ssh agent and adding ssh key
#!/bin/bash
# Set up ssh-agent
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initializing new SSH agent..."
touch $SSH_ENV
chmod 600 "${SSH_ENV}"
/usr/bin/ssh-agent | sed 's/^echo/#echo/' >> "${SSH_ENV}"
@nloadholtes
nloadholtes / client.py
Created April 5, 2012 14:42
Gearman 2.x client example
#
# client.py
#
# Based on code from http://www.darkcoding.net/software/choosing-a-message-queue-for-python-on-ubuntu-on-a-vps/
#
import sys
import time
from gearman import GearmanClient
@nloadholtes
nloadholtes / worker.py
Created April 5, 2012 14:41
Gearman 2.x worker example
#
# worker.py
#
# Based on code from http://www.darkcoding.net/software/choosing-a-message-queue-for-python-on-ubuntu-on-a-vps/
#
import time
from gearman import GearmanWorker
def speakTask(gearman_worker, job):
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@akaihola
akaihola / .gitignore
Last active June 1, 2023 12:30
streaming-json-encoder
*.pyc
/bin
/include
/lib
@mdp
mdp / cleanup.sh
Created September 30, 2011 23:36
Git branch cleanup
# This must be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
git branch --merged master | grep -v 'master$' | xargs git branch -d
# Show remote fully merged branches
echo "The following remote branches are fully merged and will be removed:"
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$'
@pims
pims / kmeans.py
Created May 29, 2011 05:19
Naive python translation of https://gist.github.com/995804
#!/usr/bin/env python
import sys
from math import sqrt
from random import random
"""
Naive python translation of https://gist.github.com/995804
Public domain.
"""