Skip to content

Instantly share code, notes, and snippets.

Adam Lindsay atl

Block or report user

Report or block atl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@atl
atl / ubooquity
Last active Dec 19, 2017
ubooquity rc.d
View ubooquity
#!/bin/sh
# PROVIDE: ubooquity
# REQUIRE: NETWORKING
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable this service:
#
# ubooquity_enable (bool): Set it to YES to enable mdnsd(8) on startup.
@atl
atl / launcher.ipynb
Last active Dec 14, 2015
This is a IPython Notebook on how to provision an IPython Cluster on the Joyent Public Cloud. It is a companion for this blog post: http://atl.me/2013/joyent-ipython-cluster . It may be viewed on the Notebook Viewer: http://nbviewer.ipython.org/5107045 .
View launcher.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@atl
atl / README.md
Created Mar 7, 2013
IPython on Joyent provisioning scripts
View README.md
@atl
atl / trac-init.sh
Last active Dec 11, 2015
Minimal initialization script to set up Trac in the Joyent Public Cloud
View trac-init.sh
#!/usr/bin/sh
# Install trac
/opt/local/bin/pkgin -y in trac
# set up the base directory (set as default by the SMF manifest)
/opt/local/bin/mkdir /trac
/opt/local/bin/chown www:www /trac
# configure a minimal base environment
@atl
atl / README.md
Last active Feb 15, 2019
enable ssh-agent transparently and pervasively in Mac OS X Lion/Mountain Lion
View README.md

This is a quick configuration upgrade that allows you to continue using ssh as you have, but with the added benefit of ssh-agent forwarding when logged into remote hosts, meaning no more keys on intermediate servers and the like.

Requirements

This snippet assumes that you've been using ssh, ssh keys, and authorized_keys on remote hosts.

  • .ssh/id_dsa and/or .ssh/id_rsa already exist
  • keys are authorized on the remote servers you have been using
  • you have at least a minimal working .ssh/config file
@atl
atl / google_twunter_lol.json
Created Jul 28, 2011 — forked from jamiew/google_twunter_lol
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
View google_twunter_lol.json
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@atl
atl / diff
Created Jun 16, 2011
pyechonest.artist.extract
View diff
--- a/pyechonest/artist.py Thu Jun 16 13:40:52 2011 +0100
+++ b/pyechonest/artist.py Thu Jun 16 13:51:16 2011 +0100
@@ -876,3 +876,28 @@
result = util.callm("%s/%s" % ('artist', 'similar'), kwargs)
return [Artist(**util.fix(a_dict)) for a_dict in result['response']['artists']]
+def extract(text='', start=0, results=15, buckets=None, limit=False, max_familiarity=None, min_familiarity=None,
+ max_hotttnesss=None, min_hotttnesss=None):
+ buckets = buckets or []
+ kwargs = {}
@atl
atl / instructions
Created Mar 24, 2011
HOWTO: compile and install redis on a no.de machine as of 2011-03-24
View instructions
# First, we need a little extra effort to install GCC
pfexec pkg_add gcc44
export PATH="$PATH:/opt/local/gcc44/bin"
pkgin in binutils
# make and install
mkdir ~/sw
cd ~/sw
wget http://redis.googlecode.com/files/redis-2.2.2.tar.gz
gtar xvf redis-2.2.2.tar.gz
@atl
atl / filtered_jTweetsAnywhere.html
Created Jun 3, 2010
example jTweetsAnywhere usage that filters out replies and old-style retweets, hides selected hashtags, preserves carriage returns, and hides repetitions of a userpic
View filtered_jTweetsAnywhere.html
<html>
<!-- I'm a beginnner with JS/jQuery, so I welcome suggestions
on how to make it more idiomatic. -->
<head>
<link rel="stylesheet" type="text/css" href="jquery.jtweetsanywhere-1.0.0.css" />
<style type="text/css">
/* Since we're showing one user's stream, show the profile image the first time: */
.jta-tweet-profile-image {visibility: hidden}
.jta-tweet-list-item:first-child .jta-tweet-profile-image {visibility: visible}
</style>
View worker.py
#!/usr/bin/env python
"""worker.py: An implementation of an event-based asynchronous pattern.
Uses generators to allow asynchronous tasks to be coded in-line. Allows the
implementer to define what technique is used to execute asynchronously and
which generator iterations are executed asynchronously.
References:
http://code.activestate.com/recipes/576952/ [inline asynchronous code]
You can’t perform that action at this time.