Skip to content

Instantly share code, notes, and snippets.

John jtdp

Block or report user

Report or block jtdp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jtdp / gist:9389912
Created Mar 6, 2014
Get all lines in file1 that do not appear in file2
View gist:9389912
grep -F -x -v -f file1 file2
jtdp / gist:9389903
Created Mar 6, 2014
Get text between quotes
View gist:9389903
sed 's/.*"\(.*\)"[^"]*$/\1/'
jtdp / gist:6054113
Created Jul 22, 2013
Find larges files in directory recursively
View gist:6054113
find . -type f -exec ls -s {} \; | sort -n -r | head -5
jtdp / gist:5747457
Created Jun 10, 2013
Delete local git branch
View gist:5747457
git branch -d branchname
jtdp / gist:5547427
Created May 9, 2013
mysqldump without locking tables
View gist:5547427
mysqldump --lock-tables=false
jtdp / gist:5452285
Created Apr 24, 2013
If you get the error: SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing... you need to set GIT_SSL_NO_VERIFY to true.
View gist:5452285
# On Centos..
jtdp / xdebug-snippets.js
Last active Sep 22, 2018
XDebug Snippets
View xdebug-snippets.js
// From
// Start XDebug Debug Session
// Stop XDebug Debug Session
javascript:(function(){document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
// Debug Current Page
javascript:(function(){document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';document.location.reload();document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
jtdp / gist:5451184
Created Apr 24, 2013
Set git username and email address
View gist:5451184
git config --global "My Name"
git config --global = "me@myemailhost.tld"
jtdp / gist:5451177
Created Apr 24, 2013
Set proxy for git to use
View gist:5451177
git config --global http.proxy http://proxyhost.tld:port
jtdp / gist:5444884
Created Apr 23, 2013
Imported gzipped sql dump into mysql database
View gist:5444884
zcat database_name_file.sql.gz | mysql -uroot -p database_name
You can’t perform that action at this time.