Skip to content

Instantly share code, notes, and snippets.

View zadkiel87's full-sized avatar

Peltier Mathias zadkiel87

View GitHub Profile
@zadkiel87
zadkiel87 / timestamp_to_human_readable
Created July 8, 2013 09:03
Convert timestamp in seconds to human readable local time in a shell script (Mac OSX).
date -r timestamp
@zadkiel87
zadkiel87 / mdworker usage
Created June 27, 2013 07:01
Stopping runaway CPU usage by mds, mdworker, and mdimport
By running this command, I was able to see what files mdworker was opening to index:
sudo fs_usage -w -f filesys mdworker
@zadkiel87
zadkiel87 / tapestry_anchor
Created June 11, 2013 12:12
Tapestry: Add an anchor with pagerenderlink
Link link = linkSource.createPageRenderLinkWithContext(ExamplePageIndex.class,parameter);
link.setAnchor("entry123");
@zadkiel87
zadkiel87 / delete_branch_git
Created June 11, 2013 12:11
Delete git branch on origin
Prepend name of the branch with ":".
Example deletion of branch "newfeature":
git push origin :newfeature
@zadkiel87
zadkiel87 / delete_mysql
Created June 11, 2013 12:10
Delete mysql syntax
DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
FROM tbl_name
[WHERE where_condition]
[ORDER BY ...]
[LIMIT row_count]
@zadkiel87
zadkiel87 / mysql_command
Created June 11, 2013 12:07
mysql command line
mysql --host=host_name --user=user_name --password=your_password db_name
@zadkiel87
zadkiel87 / find_command
Created June 11, 2013 12:06
Find command
The find command is used to locate files on a Unix or Linux system.
find will search any set of directories you specify for files that match the supplied search criteria.
find where-to-look criteria what-to-do