Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tierra's full-sized avatar

Bryan Petty tierra

View GitHub Profile
@tierra
tierra / CakePHP.php
Last active March 21, 2018 23:30
Identical route configurations with CakePHP, Laravel, Ruby on Rails, Symfony, and Zend Framework
<?php
Router::connect('/hello/world', array('controller' => 'hello', 'action' => 'world'));
@tierra
tierra / gist:3061041
Created July 6, 2012 15:57 — forked from markjaquith/gist:2628225
Script to sync wxWidgets SVN to GitHub
#!/bin/bash
# Intial git svn clone:
# git svn clone --prefix=svn/ -A ~/.svn2git/authors -s https://svn.wxwidgets.org/svn/wx/wxWidgets wxWidgets
cd ~/svn-git-mirrors/wxWidgets;
if [ -f .sync-running-wxWidgets ]; then exit 1; fi;
touch .sync-running-wxWidgets
@tierra
tierra / gist:3214247
Created July 31, 2012 06:30
wxPython GitHub Mirror Stats
$ time git clone https://github.com/wxWidgets/wxPython.git
Cloning into 'wxPython'...
remote: Counting objects: 614154, done.
remote: Compressing objects: 100% (96371/96371), done.
remote: Total 614154 (delta 512959), reused 613563 (delta 512368)
Receiving objects: 100% (614154/614154), 199.46 MiB | 1.94 MiB/s, done.
Resolving deltas: 100% (512959/512959), done.
real 3m32.011s
user 0m44.066s
@tierra
tierra / gist:3380971
Created August 17, 2012 17:48
WordPress tickets still "Awaiting Review" based on total number of opened tickets per month.
Report Run on Aug 17th, 2012
----------------------------
Aug, 2011: 242 tickets, 67 awaiting review (28%)
Sep, 2011: 261 tickets, 74 awaiting review (28%)
Oct, 2011: 260 tickets, 53 awaiting review (20%)
Nov, 2011: 299 tickets, 60 awaiting review (20%)
Dec, 2011: 296 tickets, 74 awaiting review (25%)
Jan, 2012: 230 tickets, 72 awaiting review (31%)
Feb, 2012: 196 tickets, 58 awaiting review (30%)
@tierra
tierra / sort_pidgin_groups.py
Created November 2, 2012 16:25
Sort Pidgin Groups
#!/usr/bin/python
import xml.etree.ElementTree as ET
tree = ET.parse('blist.xml')
container = tree.find('blist')
def getkey(elem):
return elem.attrib['name']
@tierra
tierra / shorten.py
Created January 26, 2013 05:15
Shorten large file.
#!/usr/bin/env python2.5
from __future__ import with_statement
# also tested with Python 2.6
import os, sys
if len(sys.argv) != 3:
print sys.argv[0] + ": Invalid number of arguments."
print "Usage: " + sys.argv[0] + " linecount filename"
print "to remove linecount lines from the end of the file"
@tierra
tierra / gist:7095615
Created October 22, 2013 05:26
WordPress constants that should have never been constants
// Constants causing serious damage (application *states* are never constant):
DOING_AJAX
DOING_AUTOSAVE
DOING_CRON
IFRAME_REQUEST
IS_PROFILE_PAGE
WP_ADMIN
WP_BLOG_ADMIN
WP_IMPORTING
@tierra
tierra / gist:7638435
Last active December 29, 2015 07:49
git_fame - WordPress
2013-11-25 - db3482a1479a62624f911539a5ecce6838c4beab (master)
Total number of files: 1,499
Total number of lines: 371,956
Total number of commits: 24,197
+-----------------------+---------+---------+-------+--------------------+
| name | loc | commits | files | percent |
+-----------------------+---------+---------+-------+--------------------+
| Andrew Nacin | 133,179 | 4,037 | 902 | 35.8 / 16.7 / 60.2 |
| Ryan Boren | 86,908 | 7,959 | 453 | 23.4 / 32.9 / 30.2 |
@tierra
tierra / gist:7642606
Last active December 29, 2015 08:19
git_fame wxWidgets
2015-11-01 - 57c9a120b7e763cde16842262b02424f8bcefea5 (master)
Total number of files: 7,545
Total number of lines: 3,202,089
Total number of commits: 60,576
+----------------------------+-----------+---------+-------+--------------------+
| name | loc | commits | files | distribution |
+----------------------------+-----------+---------+-------+--------------------+
| Vadim Zeitlin | 1,762,175 | 20,913 | 6,177 | 55.0 / 34.5 / 81.9 |
| Julian Smart | 234,575 | 4,923 | 1,925 | 7.3 / 8.1 / 25.5 |
[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