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 / rename.sh
Created December 12, 2016 20:06
bash script to mass rename files in a directory
#!/bin/sh
SRCEXT="html"
DSTEXT="txt"
for file in *.$SRCEXT; do
echo "$file -> `basename "$file" .$SRCEXT`.$DSTEXT"
mv "$file" "`basename "$file" .$SRCEXT`.$DSTEXT"
done
@ivan-loh
ivan-loh / elementary-luna.md
Last active November 19, 2016 20:08
Stuff to make ubuntu bearable on an old laptop
@ivan-loh
ivan-loh / install-watchman.sh
Last active January 27, 2022 13:02
Watchman ( 4.9.0 ) installation for Ubuntu 16.04
# checkout, compile & install
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.9.0
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool
./autogen.sh
./configure
make
sudo make install
https://www.flickr.com/photos/88005207@N00/3884016462/
https://www.flickr.com/photos/88005207@N00/3883225131
@ivan-loh
ivan-loh / install-dev-bundle.sh
Last active October 12, 2020 04:40
setup script for dev environment
#!/bin/sh
#
# util stuff
#
sudo apt install htop mosh
#
@ivan-loh
ivan-loh / install.sh
Created June 25, 2016 14:05
Ethereum - Geth Enviroment Setup
#!/bin/sh
# NodeJS
sudo apt-get update -y && sudo apt-get upgrade -y
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
@ivan-loh
ivan-loh / burger.pub
Created April 5, 2016 07:22
Public Key of Burger Machine
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCng2wmUYHcRrHpQXUQfy2vPP1xDKI9a6Uub1NdfjcWWf+3JUGxM3oaeEsGnRmZZquAZ3X8iwA4Ir0CbU7QNT4BsFQQkfsqacgLCMb/QsdYrEr9iBPi+bhTsWmbL0yBI926+W615j5ZAs+ARWGoc11umW7Yi4L7BVCdZv91OeuYb7iQbWKv1k25ed/XEhQnxI0jao4XKhR/JoBuZ7hjdEiCwDvnUFH4VFbppp+gpRS7q6fG5NNv7a5Dd9LmC4mI+iK6ocwaw/wbgRaY9fdalwJYj67JJYi7QtHbJVEj0tTuA7wFbi709vP1FMmFK0lRPtyQSYsc0pWxfnY1RGh6zpZl burger@burger-imac
@ivan-loh
ivan-loh / die.py
Created January 21, 2016 05:55
upnpc delete mapping wrapper cause im too lazy
#!/usr/bin/python
from subprocess import check_output
import sys
total = len(sys.argv)
if total < 2:
sys.exit()
@ivan-loh
ivan-loh / neb-crud.js
Created January 18, 2016 19:14
some simple crud app using neb
const async = require('async');
const Datastore = require('nedb');
const db = new Datastore({ filename: './app.db' });
async.series([
// Load Database
function (done) {
console.log('load database');