This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Uses one directory as the needle and another (or more) as the haystack | |
# to be able to determine file usage. The common use is to determine if | |
# you have any unreferenced images, css or JavaScript files. For example, | |
# use the images directory as the needle and your templates directory as | |
# the haystack to see how many times the images are referenced. If any | |
# have a count of zero, it's probably time to remove them. | |
# | |
# @author Josh Sherman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Smarty State Drop Down for PICKLES | |
* | |
* PICKLES is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Lesser General Public License as | |
* published by the Free Software Foundation, either version 3 of | |
* the License, or (at your option) any later version. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT id | |
FROM table | |
WHERE "1981-02-23" IN (date1, date2, date3, date4, date5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Nonogram Demo | |
# | |
# This script generates a 10x10 pseudo-randomly generated Nonogram puzzle | |
# with hints. This is my first app in GTK since I dabbled with it when | |
# PHP-GTK was first released, and it's my first application in PyGTK since | |
# I started dabbling with Python not to long ago. | |
# | |
# If you're wondering what a Nanogram is, go here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Updates the genre and comment tags of MP3 files with data from | |
# allmusic.com. Specifically, the genre is populated with the fairly board | |
# genre listing and the comment tag is populated with the more specific | |
# styles for a particular album. | |
# | |
# Furthermore, I don't have permission from allmusic.com to do this, so if | |
# they come after you for using it, please respect their wishes. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copies files inside nested directories to a single directory. Script does | |
# not do any checking for existing files, consider yourself warned. | |
# | |
# @author Josh Sherman | |
# @link http://joshtronic.com | |
if [ -z "$1" ]; then | |
echo "Usage: flatten-dir.sh /path/to/nested/directories [ /path/to/target/directory ]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simulates the Linux grep with the recursive flag -R Originally built to | |
# keep my sanity on older Sun Solaris installs. | |
# | |
# @author Josh Sherman | |
# @link http://joshtronic.com | |
if [ -z "$1" ]; then | |
echo "Usage: grepr.sh pattern path" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ln -s /var/run/mysqld/mysqld.sock /var/lib/mysql/mysql.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteRule ^(.+)$ index.php?request=$1 [NC,QSA] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Object | |
{ | |
public function __construct() | |
{ | |
return $this; | |
} | |
public function piss() |