Skip to content

Instantly share code, notes, and snippets.

View gms8994's full-sized avatar

Glen Solsberry gms8994

View GitHub Profile
@gms8994
gms8994 / gasmask_focus_mode
Created October 17, 2012 17:53 — forked from axelav/gasmask_focus_mode
Gasmask focus mode
0.0.0.0 twitter.com
0.0.0.0 mail.google.com
0.0.0.0 facebook.com
0.0.0.0 www.facebook.com
0.0.0.0 nytimes.com
0.0.0.0 www.nytimes.com
0.0.0.0 news.ycombinator.com
0.0.0.0 stellar.io
0.0.0.0 www.stellar.io
@gms8994
gms8994 / sql2xls.pl
Created July 25, 2012 14:07
Executes SQL commands against server; uploads results to Google Spreadsheets
#!/usr/bin/perl
# Allows the user to take the result of a series of SQL queries
# and place them in Google docs, so that data can be easily shared
# Author: Glen Solsberry <http://dp.cx/blog>
# Copyright: Public Domain
use warnings;
use strict;
May 30 08:55:13.470 [12381] dbg: logger: adding facilities: all, bayes, learn, dns
May 30 08:55:13.470 [12381] dbg: logger: logging level is DBG
May 30 08:55:13.470 [12381] dbg: generic: SpamAssassin version 3.3.2
May 30 08:55:13.470 [12381] dbg: generic: Perl 5.010001, PREFIX=/usr/local, DEF_RULES_DIR=/usr/local/share/spamassassin, LOCAL_RULES_DIR=/etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
May 30 08:55:13.470 [12381] dbg: config: timing enabled
May 30 08:55:13.471 [12381] dbg: config: score set 0 chosen.
May 30 08:55:13.474 [12381] dbg: util: running in taint mode? yes
May 30 08:55:13.474 [12381] dbg: util: taint mode: deleting unsafe environment variables, resetting PATH
May 30 08:55:13.474 [12381] dbg: util: PATH included '/home/glens/bin', keeping
May 30 08:55:13.474 [12381] dbg: util: PATH included '/usr/local/bin', keeping
<?xml version='1.0' encoding='UTF-8'?>
<accounts type='array'>
<account>
<id>44283</id>
<name></name>
<event-feed-uri>/events.rss</event-feed-uri>
<applications type='array'>
<application>
<id type='integer'>156463</id>
<name>NetworldAlliance</name>
@gms8994
gms8994 / cdn_tester.sh
Created May 17, 2011 14:17
curl timer fetch stackexchange CDNs
#!/bin/bash
REPEAT=20
TIMER=0
function fetchTimer {
URL=$1
CURRENT_TIME=`curl --compressed -w '%{time_total}' -o /dev/null -s $URL`;
TIMER=`echo "$CURRENT_TIME + $TIMER" | bc`
@gms8994
gms8994 / 1.php
Created April 26, 2011 19:52
Benchmark Comparison
<?php
class Test {
public function test() {
return "abcd1234";
}
}