Skip to content

Instantly share code, notes, and snippets.

View jasonhancock's full-sized avatar
meh

Jason Hancock jasonhancock

meh
View GitHub Profile
@jasonhancock
jasonhancock / redis_loading
Last active October 5, 2017 23:38
A script to generate a progress bar tracking Redis' progress loading the data files on startup
#!/usr/bin/perl
# Copyright (c) 2012 Jason Hancock <jsnbyh@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is furnished
# to do so, subject to the following conditions:
@jasonhancock
jasonhancock / puppet apache log analyzer
Created August 23, 2012 18:09
Analyze puppet's apache logs.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my $file = $ARGV[0] or die('Must pass an apache access logfile');
open IN, "<$file" or die("Can't open $file");
@jasonhancock
jasonhancock / gist:3382454
Created August 17, 2012 20:44
Inerting/selecting GUIDs into/from MySQL
mysql>CREATE TABLE jive (uuid CHAR(16) BINARY);
Query OK, 0 rows affected (0.02 sec)
mysql> select UUID();
+--------------------------------------+
| UUID() |
+--------------------------------------+
| 519718a1-e8ab-11e1-8803-080027e1c419 |
+--------------------------------------+
1 row in set (0.00 sec)
@jasonhancock
jasonhancock / tasseo.spec
Created August 2, 2012 22:40
.spec file for building Tasseo into an RPM
%define githash 46d8a8f
Name: tasseo
Summary: A lightweight, easily configurable, real-time dashboard for Graphite events.
Version: 0.0.1
Release: 1%{?dist}
License: 3-clause BSD
Group: Applications/System
URL: https://github.com/obfuscurity/tasseo
Source0: obfuscurity-tasseo-%{githash}.tar.gz
@jasonhancock
jasonhancock / php-pear-AWSSDKforPHP.spec
Created July 20, 2012 15:28
A .spec file for the AWS PHP SDK
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%define pear_name AWSSDKforPHP
Name: php-pear-AWSSDKforPHP
Version: 1.5.10
Release: 1%{?dist}
Summary: AWS SDK for PHP
Group: Development/Libraries
License: Apache-2.0
URL: http://aws.amazon.com/sdkforphp/