Skip to content

Instantly share code, notes, and snippets.

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

Ivan Loh ivan-loh

🐢
Chilling
  • ERIAD SOLUTION PLT
  • Malaysia
  • 09:18 (UTC +08:00)
View GitHub Profile
@ivan-loh
ivan-loh / docker-compose.yml
Created April 1, 2024 15:39
development stack
services:
neo4j:
image: neo4j:latest
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=none
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
- NEO4J_apoc_export_file_enabled=true
@ivan-loh
ivan-loh / compile-install-emacs.sh
Last active March 31, 2024 05:06
Compile and install emacs 28.1 for Ubuntu
#!/bin/bash
sudo apt install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev libgnutls28-dev
wget http://ftp.gnu.org/gnu/emacs/emacs-29.3.tar.gz
tar xvzf emacs-29.3.tar.gz
cd emacs-29.3
./configure --with-mailutils
make
@ivan-loh
ivan-loh / Main.go
Last active August 8, 2019 06:44
Sample Bigquery Streaming
package main
import (
"cloud.google.com/go/bigquery"
"context"
"google.golang.org/api/googleapi"
"log"
"time"
)
@ivan-loh
ivan-loh / Job.go
Created December 14, 2018 03:35
golang google bigquery check for job error
package main
import (
"cloud.google.com/go/bigquery"
"context"
"log"
)
func main () {
@ivan-loh
ivan-loh / memory.sh
Created December 16, 2017 08:36
script to use to monitor memory utilization
#!/bin/bash
function alert {
curl --header 'Access-Token: <access_token_here>' \
--header 'Content-Type: application/json' \
--data-binary '{"body":"Memory Threshold Reachd","title":"Database Server Alert","type":"note"}' \
--request POST \
https://api.pushbullet.com/v2/pushes
}
@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 / zeppelin-bq.MD
Created March 10, 2017 06:12
how to get zepplin's bq interpreter to play nice with bq

too lazy to explain the steps but it goes something like this

  1. "install" gcloud sdk
  2. gcloud init
  3. bq command setup
  4. setup application default login gcloud auth application-default login --no-launch-browser
@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 {