Skip to content

Instantly share code, notes, and snippets.

:shipit: 👍

Jake jheidt

:shipit: 👍
View GitHub Profile
ogrodnek / gist:2933779
Created Jun 15, 2012
AWS Billing hive schema
View gist:2933779
create external table aws_billing(
InvoiceId string,
PayerAccountId string,
LinkedAccountId string,
RecordType string,
RecordID int,
BillingPeriodStartDate string,
BillingPeriodEndDate string,
InvoiceDate string,
PayerAccountName string,
lhw / pom.xml
Created Aug 30, 2012
maven file with sqlite4java
View pom.xml
<?xml version="1.0"?>
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
radupotop / gist:4013294
Created Nov 4, 2012
PolKit rules to allow mounting, rebooting and network management without a password
View gist:4013294
// /etc/polkit-1/rules.d/10-rules.rules
// PolKit rules to allow mounting, rebooting and network management without a password.
// User needs to be in storage, power and network groups.
polkit.addRule(function(action, subject) {
if ("org.freedesktop.udisks2.") && subject.isInGroup("storage")) {
return polkit.Result.YES;
nmcv / bash_xor.txt
Created Feb 1, 2013
Quick XOR of hexadecimal strings for BASH
View bash_xor.txt
# BASH function to get the result
# of a ^ b when a, b are in the
# following hexadecimal string
# form: AF396463D8705 ...
# Obtained from here:
# Author is Sanjay1982 (see
# Usage:
sj26 / assets.rake
Last active Dec 12, 2015
Don't discard cache during asset precompile. Full explanation and caveats:
View assets.rake
# Stick this in lib/tasks/assets.rake or similar
# A bug was introduced in rails in 7f1a666d causing the whole application cache
# to be cleared everytime a precompile is run, but it is not neccesary and just
# slows down precompiling.
# Secondary consequences are the clearing of the whole cache, which if using
# the default file cache could cause an application level performance hit.
# This is already fixed in sprockets-rails for rails 4, but we patch here for
havenwood / producer-consumer.rb
Created May 14, 2013
Producer-consumer problem in Ruby with SizedQueue
View producer-consumer.rb
require 'thread'
class ProducerConsumer
def initialize producers = 5, consumers = 5, queue_size = 5
@producers, @consumers = producers, consumers
@queue = queue_size
@mutex =
@threads = []
leemour / FontFix RubyMine
Last active Oct 6, 2018
Fixing font anti-aliasing for Ubuntu.
View FontFix RubyMine
# Change Java Runtime:
sudo update-alternatives --config java
# Delete Open-JDK
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
# Change fonts - remove hinting:
# Change RubyMine AntiAliasing first:
# The author of the original script is unknown to me. The first entry I can
# find was posted at 2010-03-21 09:50:09 on Arch Linux Forums (doesn't mean the
# poster is the author at all):
# I, Yu-Jie Lin, made a few changes and additions:
# -p, -t, -R, and -C
tnolet / gist:7361441
Last active Dec 5, 2018
Install collectd 5.4 on Centos 6.x and make it spit out cool metrics. Copied from and tweaked for your and my pleasure. For all other cool options, check the provided link.
View gist:7361441
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
tar zxvf collectd-5.4.0.tar.gz
View HTML5 Shim
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>