Skip to content

Instantly share code, notes, and snippets.

@joannaong
joannaong / python-httpserver.md
Last active August 20, 2021 13:31
python http server

Python 2

python -m SimpleHTTPServer 8000

Python 3

python -m http.server 8000

@joannaong
joannaong / vagrant-mySQLWorkbench.md
Last active August 13, 2018 12:20
vagrant-mySQLWorkbench

Step-by-step guide @http://www.bentedder.com/using-mysql-workbench-with-vagrant/

Download (if you don't have it) MySQL Workbench

  • Within your project directory type vagrant ssh-config in the command line.
  • This will give you a few things you'll need.
User: (most likely vagrant)
IdentityFile (the path to the private key that MySQL workbench will need)
@joannaong
joannaong / raf.js
Created April 4, 2016 17:38
raf.js
/**
* Drop in replace functions for setTimeout() & setInterval() that
* make use of requestAnimationFrame() for performance where available
* http://www.joelambert.co.uk
* Copyright 2011, Joe Lambert.
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
@joannaong
joannaong / git.txt
Last active September 16, 2016 01:05
git
DELETE TAG
----------
git tag -d 12345
git push origin :refs/tags/12345
CREATE TAG
----------
git tag 12345
git push origin 12345
nano ~/.zshrc
# Keypad
# 0 . Enter
bindkey -s "^[Op" "0"
bindkey -s "^[Ol" "."
bindkey -s "^[OM" "^M"
# 1 2 3
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
@joannaong
joannaong / .htaccess
Created November 19, 2015 01:10 — forked from jxnblk/.htaccess
.htaccess for using AngularJS's in HTML5 mode on Media Temple
Options +FollowSymLinks
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]
</ifModule>
@joannaong
joannaong / update-all-npm
Last active January 12, 2016 02:15
update all npm packages inside package.json
# npm
sudo npm install -g npm-check-updates
ncu
ncu --upgradeAll
# bower
sudo npm install -g bower-check-updates
bcu
bcu --upgradeAll
npm install
@joannaong
joannaong / set_closurePath
Last active August 29, 2015 14:23
setting CLOSURE_PATH permanently
cd ~
touch .bash_profile
nano .bash_profile
put in
export CLOSURE_PATH=/Users/jong/work/closure_compiler
// Fonts mixin
font-url(file)
return '../fonts/' + file
webfont(family, file, hack-chrome-windows = false, weight = 'normal')
@font-face
font-family family
src url(font-url(file + '.eot'))
src url(font-url(file + '.eot?#iefix')) format('embedded-opentype'),
url(font-url(file + '.woff')) format('woff'),
/**
* Responsive style mixins.
*
* Usage:
* +tablet()
* prop val
*/
breakpoint-one = 1600px