Skip to content

Instantly share code, notes, and snippets.

View ivan-loh's full-sized avatar
🍌
Chilling

Ivan Loh ivan-loh

🍌
Chilling
View GitHub Profile
@ivan-loh
ivan-loh / Gitlab CI.md
Created February 20, 2017 19:59
Basic continuous deployment flow with GitLab Community Edition 8.16.6
@ivan-loh
ivan-loh / read-csv.go
Created December 25, 2016 15:53
reading some csv file
package main
import (
"bufio"
"encoding/csv"
"fmt"
"io"
"log"
"os"
)
@ivan-loh
ivan-loh / main.go
Created December 25, 2016 14:28
mongodb crud in golang
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
)
type Person struct {
@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