Skip to content

Instantly share code, notes, and snippets.

# Quick wrapper for undocumented and unsupported MyMileMarker.com API
require 'rubygems'
gem 'httparty', '>= 0.3.1'
require 'httparty'
module MyMileMarker
class Client
include HTTParty
@justone
justone / events.jquery.org.js
Created October 3, 2011 15:01
dotjs script to allow picking your schedule on http://events.jquery.org/2011/boston/schedule/ (stick amplify.store.js into default.js)
(function(amplify) {
var selected_color = '#9E9E9E';
var unselected_color = '#E9E9E9';
var schedule_data = amplify.store('mySchedule');
if (schedule_data == null) {
schedule_data = {};
}
//console.log(schedule_data);
@justone
justone / rtail.py
Created October 7, 2011 20:50 — forked from messa/rtail.py
#!/usr/bin/env python
"""
Usage:
./rtail.py user@host:path/foo.log bar.log host2:/path/baz.log
"""
import optparse
import os
@justone
justone / oscon.com.js
Created July 18, 2012 18:41
dotjs for hacking the OSCON 2012 schedule
var highlighting_chosen_sessions = false;
var hidden = false;
function highlight_chosen_sessions() {
// look for all hightlighted icons and update the session div to have a border
$('img[src="/images/personal-schedule-icon2.png"]').each(function(index, icon) {
$(icon)
.closest('.session')
.not('.highlighted')
.addClass('highlighted')
@justone
justone / salt-master
Created July 30, 2012 20:47
saltstack on lenny
#!/bin/sh
#
# Salt master
###################################
# LSB header
### BEGIN INIT INFO
# Provides: salt-master
# Required-Start: $remote_fs $network
@justone
justone / build_gitolite_deb.sh
Created August 1, 2012 23:47
gitolite v3 debian package
#!/bin/bash
# install rvm
aptitude install -y curl libz-dev
curl -L https://get.rvm.io | bash -s stable --ruby
source /usr/local/rvm/scripts/rvm
gem install fpm
# git clone
aptitude install -y git
@justone
justone / Vagrantfile
Created November 11, 2013 17:29
Vagrant shell provisioner to set up cpanm/carton
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# change to whatever box you want
config.vm.box = "ubuntu1204"
@justone
justone / dedupe.cljs
Last active September 4, 2015 13:12
Using planck to dedupe a weechat log file.
#!/usr/bin/env planck
(ns dedupe.core
(:require [planck.io :refer [read-line]]
[clojure.string :refer [split]]))
(defn line-seq
"Create a lazy sequence of stdin, from http://blog.fikesfarm.com/posts/2015-08-01-planck-scripting.html."
[]
(take-while identity
@justone
justone / gatling.scala
Created November 17, 2015 20:41
Demo Gatling script
package cdb
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class BasicSimulation extends Simulation {
@justone
justone / Dockerfile
Last active March 17, 2016 15:33
Docker Size and VirtualSize reported differently on v1.9 and v1.10
FROM alpine
LABEL FOO=Bar