Skip to content

Instantly share code, notes, and snippets.

View tierra's full-sized avatar

Bryan Petty tierra

View GitHub Profile
@tierra
tierra / graphite-statsd-osx.md
Last active June 15, 2018 10:46
Install and run development Graphite / Statsd on OSX

Graphite

sudo pip install Django==1.8 graphite-web carbon
brew install cairo
sudo pip install -r https://raw.githubusercontent.com/graphite-project/graphite-web/master/requirements.txt
cd /opt/graphite
sudo chown -R [YOUR_USERNAME] storage
@tierra
tierra / git-backup-mirror.sh
Last active October 16, 2017 04:04
Mirroring git repositories for backup purposes.
git config gc.pruneExpire never
git config gc.reflogExpire never
git config gc.reflogExpireUnreachable never
git config core.logAllRefUpdates true
@tierra
tierra / convert-avatars.php
Last active April 2, 2019 22:13
phpBB 3.1 script that fetches all remote avatars, and converts them to uploaded avatars hosted locally.
<?php
/**
* Converts all phpBB 3.1 remote avatars to uploaded avatars.
*
* To use this script:
*
* 1. Copy this file into the root of your phpBB installation.
* 2. Run the script from the command line: php convert-avatars.php
*
* Any avatar will be skipped if any errors come up, like these:
@tierra
tierra / Vagrantfile
Last active August 29, 2015 14:14
wxWidgets Documentation Vagrant Box
# -*- mode: ruby -*-
# vi: set ft=ruby :
$sudo_script = <<SUDOSCRIPT
apt-get update
apt-get -y install doxygen graphviz
apt-get -y --no-install-recommends install texlive-latex-extra texlive-fonts-recommended
SUDOSCRIPT
Vagrant.configure("2") do |config|
@tierra
tierra / phpfpm_average
Last active August 29, 2015 14:07
Munin plugins for PHP-FPM
#!/bin/sh
#%# family=manual
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
@tierra
tierra / remove_duplicates.py
Created September 30, 2014 22:11
Recursively remove duplicate files
#!/usr/bin/env python
import os
from optparse import OptionParser
def remove_duplicates(working_path, compare_path, pretend = False,
compare_size = False, recurse = False):
'''Compares contents of two paths, removing
identical content in the working path.'''
@tierra
tierra / glibchash.c
Created September 30, 2014 22:02
tierra's C++ vs dataw0lf's Python speedhash challenge!
// Kill me if I ever have to use glibc ever again, almost as bad as Perl.
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
@tierra
tierra / drop-tables.sql
Created September 8, 2014 16:27
Drop Tables SQL
SET FOREIGN_KEY_CHECKS = 0;
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
FROM information_schema.tables
WHERE table_schema = 'database_name'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
PREPARE stmt FROM @tables;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET FOREIGN_KEY_CHECKS = 1;
@tierra
tierra / composer.json
Last active October 26, 2015 01:25
Utilities to support wxWidgets infrastructure.
{
"name": "tierra/wxUtilities",
"homepage": "http://www.wxwidgets.org/",
"description": "Utilities to support wxWidgets infrastructure.",
"keywords": ["wxwidgets", "github"],
"license": "MIT",
"authors": [
{
"name": "Bryan Petty",
"email": "bryan@ibaku.net"
[43881.471021] usb 3-3: new SuperSpeed USB device number 3 using xhci_hcd
[43881.488529] usb 3-3: New USB device found, idVendor=152d, idProduct=0551
[43881.488538] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[43881.488544] usb 3-3: Product: USB to ATA/ATAPI Bridge
[43881.488548] usb 3-3: Manufacturer: JMicron
[43881.488551] usb 3-3: SerialNumber: 6290003FFFFF
[43886.485186] usb 3-3: Set SEL for device-initiated U1 failed.
[43891.483389] usb 3-3: Set SEL for device-initiated U2 failed.
[43891.483515] usb-storage 3-3:1.0: USB Mass Storage device detected
[43891.483688] scsi5 : usb-storage 3-3:1.0