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 / rxjs_operators_by_example.md
Created March 21, 2017 16:24 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@ivan-loh
ivan-loh / install_scala_sbt.sh
Last active November 9, 2015 15:37 — forked from visenger/install_scala_sbt.sh
Scala and sbt installation on ubuntu 12.04
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.7.deb
sudo dpkg -i scala-2.11.7.deb
sudo apt-get update
@ivan-loh
ivan-loh / GIF-Screencast-OSX.md
Created October 11, 2015 07:25 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ivan-loh
ivan-loh / osx-for-hackers.sh
Created October 2, 2015 16:57 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
storage:
dbPath: "./data"
directoryPerDB: true
journal:
enabled: true
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 8
journalCompressor: snappy
storage:
dbPath: "./data"
directoryPerDB: true
journal:
enabled: true
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 8
journalCompressor: none
storage:
dbPath: "./data"
directoryPerDB: true
journal:
enabled: true
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 8
journalCompressor: zlib

Using Homebrew to manage Node.js and io.js installs on OSX

Having both Node.js and io.js installed with NVM was giving me a load of problems, mainly with npm. So I uninstalled NVM and manage Node.js and io.js with homebrew.
Heres how.

Install Node.js and io.js

$ brew install node
$ brew install iojs

@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');