Skip to content

Instantly share code, notes, and snippets.

View thejasonfisher's full-sized avatar

Jason Fisher thejasonfisher

View GitHub Profile
#/usr/bin/env python
"""
This is a simple prototype for a bup inotify command. It watches a directory
and backs its created, modified, or deleted content up.
Requirements:
- bup
Get it from http://github.com/apenwarr/bup
- pyinotify
@tlrobinson
tlrobinson / LICENSE.txt
Created October 2, 2011 08:56
Extremely simple lexer, parser, compiler, and interpreter for a prefix notation calculator.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bkimble
bkimble / gist:1365005
Last active August 22, 2024 14:21
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
@mrconnerton
mrconnerton / gist:1979037
Last active December 4, 2018 15:13
node form in ctools modal drupal 7
<?php
/*
Make Sure you include:
ctools_include('modal');
ctools_modal_add_js();
On the pages you put your link.
*/
@deviantintegral
deviantintegral / compress-tables.sh
Created April 12, 2012 17:27
Compress MySQL Tables
#!/usr/bin/env bash
# Compress MySQL tables on disk.
# Author: Andrew Berry, [email protected]
#
# Compress all tables in a MySQL InnoDB database using compression from the
# Barracuda table format. Tables have to already be in the Barracuda file
# format to actually compress tables, otherwise the table setting is ignored.
#
# innodb_file_per_table = 1 MUST be set in my.cnf for compression to work.
@glidenote
glidenote / app-td-agent.conf
Created May 19, 2012 20:59
fluentd conf files
# appサーバ用の設定
<source>
type tail
path /var/log/nginx/access.log
format apache
tag nginx.access
pos_file /var/log/td-agent/nginx.pos
</source>
<match nginx.access>
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
package com.atlantbh.nutch.filter.xpath;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Arrays;
@whatvn
whatvn / read_mfs_write_qfs_multithread.py
Created November 17, 2012 06:14
Read from MooseFS, write to QFS using multithreading
"""
- sequence read
- sequence write
"""
import os
import sys
import time
import errno
@Moqume
Moqume / etc_garbd
Created November 24, 2012 23:24
garbd (Galera Arbitrator) init script
GARBD_ADDRESS="gcomm://192.168.1.2"
GARBD_GROUP="my_snazzy_cluster"