Skip to content

Instantly share code, notes, and snippets.

Exception in thread "main" java.lang.RuntimeException: No such var: leiningen.util.injected/add-hook, compiling:(NO_SOURCE_PATH:1:3757)
at clojure.lang.Compiler.analyze(Compiler.java:6380)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3573)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
@growse
growse / measureping.py
Created May 7, 2014 21:47
Script to measure gateway ping and wifi strength/bitrate and pipe into graphite.
#!/usr/bin/env python
import argh
import sh
import subprocess
import ping
import socket
import time
import sys
import re
@growse
growse / core-site.xml
Created July 18, 2014 21:06
Hadoop partition testing configuration
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://mycluster</value>
</property>
<property>
<name>ha.zookeeper.quorum</name>

Keybase proof

I hereby claim:

  • I am growse on github.
  • I am growse (https://keybase.io/growse) on keybase.
  • I have a public key whose fingerprint is 6F8A 63EE DB54 7814 15B3 F21C 7332 9B94 4E12 79FD

To claim this, I am signing this object:

@growse
growse / gist:1306667
Created October 23, 2011 00:13
SQLite schema updater
/*
I needed a way to look at an existing SQLite schema, compare it to a text file containing some table
definitions and then work out if the two were the same. Here's how I did it.
The hashtable 'givenschema' contains each table create statement keyed by the name of the table.
*/
public static void CheckSchema()
{
@growse
growse / Program.cs
Created November 10, 2011 14:50
Bulk copy SQL from GNU splitted Postgres CSV output into MSSQL with IDENTITY_INSERT
using System;
using System.Data;
using System.Data.SqlClient;
using System.IO;
namespace ARGHGHGHGHG
{
internal class Program
{
static int progress = 0;
@growse
growse / iostat_to_graphite.py
Created July 19, 2012 08:07
Python port of a https://gist.github.com/915862 to send disk stats in solaris to a remote graphite server.
#!/usr/bin/python
"""
Run this with something like iostat -nx 60 2 | iostat_to_graphite.py
"""
import sys, os, re, socket, time
"""ARGF from Ruby in Python.
Released into the public domain by Andrew Gwozdziewycz, 2010
"""
@growse
growse / kstat_to_graphite.py
Created July 24, 2012 10:03
Parse kstat -p output and fling it at graphite.
#!/usr/bin/python
import sys, os, re, socket, time
"""ARGF from Ruby in Python.
Released into the public domain by Andrew Gwozdziewycz, 2010
"""
class _ARGF(object):
def __init__(self):
#!/usr/bin/env bash
TIME=$((1000000000* `date +%s`))
curl -XPOST http://storebot.growse.com:8086/write?db=main --data-binary $"chrony_systemtimeoffset,host=`hostname` value=`chronyc tracking |grep 'System time'|cut -f 2 -d ':'|sed 's/ *\([0-9\.]*\) seconds \(slow\|fast\) of NTP time/\2\1/g'|sed 's/slow/-/'|sed 's/fast//'` $TIME
chrony_frequency,host=`hostname` value=`chronyc tracking |grep 'Frequency'|cut -f 2 -d ':'|sed 's/ *\([0-9\.]*\) ppm \(slow\|fast\)/\2\1/g'|sed 's/slow/-/'|sed 's/fast//'` $TIME"
@growse
growse / gist:4745746
Created February 9, 2013 15:37
Teamcity powershell task to output current build number, date, and svn rev in JSON to 'build.json' in root.
Add-Type -Assembly System.ServiceModel.Web,System.Runtime.Serialization
function Read-Stream {
PARAM(
[Parameter(Position=0,ValueFromPipeline=$true)]$Stream
)
process {
$bytes = $Stream.ToArray()
[System.Text.Encoding]::UTF8.GetString($bytes,0,$bytes.Length)
}}