Skip to content

Instantly share code, notes, and snippets.

View cillosis's full-sized avatar
:octocat:
Coding

Jeremy Harris cillosis

:octocat:
Coding
View GitHub Profile
A random collection of links to tools I come across so I can remember them.
Open Source Lightweight Image Viewer: https://imageglass.org
# When using Cmder in Windows and trying to set the startup directory, this works with git bash where "C:\projects" is the target directory
sh --login -i "-cur_console:d:C:\projects"
@cillosis
cillosis / GitIgnore Fix
Created December 30, 2013 14:20
When .gitignore is not working...
git rm -r --cached .
git add .
@cillosis
cillosis / gist:6370801
Created August 28, 2013 20:27
Git Hook - PHP Syntax Checker (pre-commit)
echo ""
echo "******************************"
echo "** Running PHP Syntax Check **"
echo "******************************"
if [ -z "$PHP_BIN" ]
then
PHP_BIN=php
fi
@cillosis
cillosis / SVNRefresh
Created April 15, 2013 13:11
SVN Refresh - Recursive SVN UP on directories using a bash alias.
alias svnrefresh='find . -mindepth 1 -maxdepth 3 -name "*.svn" -type d -exec svn up {}/.. \;'
@cillosis
cillosis / WordPressPluginsAsShortCode
Last active December 13, 2015 20:58
Make any WordPress Plugin insertable with a Shortcode
/**
* Any Widget As ShortCode
* @uses http://digwp.com/2010/04/call-widget-with-shortcode/
*/
function widget($atts) {
// Initialize values
$instance = null;
$id = null;
@cillosis
cillosis / PHPLineCountNoSVN
Created February 7, 2013 21:45
Count number of lines of code in PHP/PHTML files for a directory while ignoring SVN files.
find . -name '*.ph*' -not \( -name "*svn*" \) | xargs wc -l
@cillosis
cillosis / MySQLSchemaExport
Created January 31, 2013 16:45
MySQL Database Schema Export
mysqldump -u user -h localhost --no-data -p database > database.sql
@cillosis
cillosis / MacFileRemoverForSVN
Last active April 2, 2016 01:12
Remove ._. and .DS_* files from folder on Mac OS X
find . -type f \( -iname "._*" \) -exec svn delete {} \;
find . -type f \( -iname ".DS_*" \) -exec svn delete {} \;