Skip to content

Instantly share code, notes, and snippets.

View ivan-loh's full-sized avatar
🌴
On vacation

Ivan Loh ivan-loh

🌴
On vacation
  • ERIAD SOLUTION PLT
  • Malaysia
View GitHub Profile
@ivan-loh
ivan-loh / app.js
Last active December 30, 2015 05:59
need a quick and dirty way to send files from offsite server ? node to the rescue
var program = require('commander');
var nodemailer = require('nodemailer');
/**
* args
**/
program
.version('0.0.1')
.option('-n, --name [value]', 'Name of the attachment file')
@ivan-loh
ivan-loh / decorator.py
Last active December 31, 2015 17:09
ignore errors and added custom date. copied from https://github.com/skazhy/github-decorator python decorator.py ascii.txt
# github decorator
# https://github.com/skazhy/github-decorator
# \m/ 2013, skazhy
import os
import fileinput
from datetime import date, timedelta
from subprocess import Popen
@ivan-loh
ivan-loh / ascii.txt
Created December 18, 2013 07:01
ascii.txt
++.. ##### ##### #### ##### ..++
+.. --#-- --#-- #---# #---- ..+
.. # # # # ##### ..
. # # # # #---- .
.. # # # # # ..
+.. # ##### ####- ##### ..+
++.. - ----- ---- ----- ..++
@ivan-loh
ivan-loh / app.js
Last active January 2, 2016 02:29 — forked from arvis/app.js
mongoose CRUD
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http')
, mongoose = require('mongoose')
, path = require('path');
rm -rf ~/Library/Preferences/IntelliJIdea13/
rm -rf ~/Library/Application\ Support/IntelliJIdea13/
@ivan-loh
ivan-loh / onepage.html
Last active August 29, 2015 13:57
Hybrid One Page Screen
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hybrid One Page Scroll</title>
<link type='text/css' rel='stylesheet' href='http://fonts.googleapis.com/css?family=Quicksand|Montserrat:700,400'>
@ivan-loh
ivan-loh / cheatsheet
Last active August 29, 2015 14:01
markdown cheatsheet
This is intended as a quick reference and showcase. For more complete info, see [John Gruber's original spec](http://daringfireball.net/projects/markdown/) and the [Github-flavored Markdown info page](http://github.github.com/github-flavored-markdown/).
Note that there is also a [Cheatsheet specific to Markdown Here](./Markdown-Here-Cheatsheet) if that's what you're looking for.
PLEASE DO NOT EDIT THIS PAGE! You can play around with Markdown on our [live demo page](http://www.markdown-here.com/livedemo.html).
##### Table of Contents
[Headers](#headers)
[Emphasis](#emphasis)
[Lists](#lists)
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
<template>
@ivan-loh
ivan-loh / install_redis.sh
Last active August 29, 2015 14:07
Ubuntu - Redis Server
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
@ivan-loh
ivan-loh / install_zeromq.sh
Last active August 29, 2015 14:07
installing zeromq + nodejs + zerorpc on ubuntu
sudo add-apt-repository ppa:chris-lea/zeromq
sudo apt-get update
sudo apt-get install libzmq3-dev
npm install zerorpc