Skip to content

Hacking

Auto sync GIT repos in MAC

Use the following to auto-commit your changes in git repo. The commit will include the file changed. You can control the monitor interval by changing the variable sleeptime in git-commit-repos.sh. All the git operations are logged in /tmp/gitwatch-commit.log.

Export all pdf notes at once

I already have jekyll serving markdown files. So, I thought what if I could also add my skim (a MAC pdf reader) notes to it. After searching and going through skim sourceforge wiki, I collected this script to do this.

Cheatsheet

  1. Add new user and database to Mysql

    SQL
    1
    2
    3
    4
    Create database <database>;
    CREATE USER '<user>'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON <database>.* TO <user>@localhost';
    FLUSH PRIVILEGES;