Skip to content

Instantly share code, notes, and snippets.

@jaxzin
jaxzin / keybase.md
Created April 7, 2014 14:15
keybase.md

Keybase proof

I hereby claim:

  • I am jaxzin on github.
  • I am jaxzin (https://keybase.io/jaxzin) on keybase.
  • I have a public key whose fingerprint is 2CDD E247 9125 9D15 4E83 BB28 E2B6 8177 3FD7 E15D

To claim this, I am signing this object:

@jaxzin
jaxzin / snap-ci.sh
Last active August 29, 2015 14:13
Snap-CI pipeline config for autodeploying danbury.io pull requests
# Deploy Stage
sudo yum install --assumeyes jq
heroku apps:destroy \
--app danburyio-pr$SNAP_PULL_REQUEST_NUMBER \
--confirm danburyio-pr$SNAP_PULL_REQUEST_NUMBER || true
heroku create danburyio-pr$SNAP_PULL_REQUEST_NUMBER \
--buildpack https://github.com/heroku/heroku-buildpack-nodejs.git
heroku addons:add mongolab:sandbox
heroku domains:add $SNAP_PULL_REQUEST_NUMBER.pr.danbury.io
curl -H "X-DNSimple-Token: $DNSIMPLE_USER:$DNSIMPLE_TOKEN" \
@jaxzin
jaxzin / rateplot.bash
Created June 18, 2015 02:32
Watching a long running git svn fetch...
# Watch the .git dir and log any file size changes
delay=1; prev=`du -sk .git/ | cut -f 1`; sleep $delay; while true; do cur=`du -sk .git/ | cut -f 1`; expr \( $cur - $prev \) / $delay ; prev=$cur; sleep $delay; done > rate.log &
# Chart the .git dir's file size changes (estimate of activity)
watch -n 1 'gnuplot -e "set terminal dumb;p \"<tail -25 rate.log\" with lines notitle"'
@jaxzin
jaxzin / gist:929276
Created April 19, 2011 18:59
Ban logging dependencies that collide with slf4j or your chosen logging implementation.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0-alpha-3</version>
<executions>
<execution>
<id>ban-other-loggers</id>
<goals>
<goal>enforce</goal>
</goals>
@jaxzin
jaxzin / gist:929283
Created April 19, 2011 19:02
SLF4J dependencies for routing all log messages through one logging implementation.
<!-- Use JDK logging for runtime since that's what Glassfish uses. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.5.6</version>
<scope>runtime</scope>
</dependency>
<!-- Anything using log4j should defer to slf4j. -->
<dependency>
@jaxzin
jaxzin / gist:1136294
Created August 10, 2011 07:16
Trying to import old emails into Tumblr
-- Used the Tumblr v1 API because it is light-years simpler http://www.tumblr.com/docs/en/api/v1#api_write
--
-- To use this, open it in the AppleScript Editor, change the properties below,
-- switch to Mail and select the emails with pics attached that you wish to import to tumblr,
-- switch back to the AppleScript Editor and press Run.
--
-- NOTE: tumblr limits your photo uploads to 75 per day, so plan accordingly.
--
property tumblr_email : "----"
<dependencyManagement>
<dependencies>
<!-- Manage secondary loggers by claiming they will be provided -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
</dependency>
<dependency>
@jaxzin
jaxzin / gist:1219531
Created September 15, 2011 15:18
All secondary frameworks will be provided by SLF4J
<dependencyManagement>
<dependencies>
<!-- Manage secondary loggers by claiming they will be provided -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
</dependency>
<dependency>
@jaxzin
jaxzin / gist:1725568
Created February 2, 2012 20:27
Banning duplicate classes
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0.1</version>
<inherited>true</inherited>
<executions>
<execution>
<id>enforce-no-duplicate-classes</id>
<goals>
<goal>enforce</goal>
</goals>