Skip to content

Instantly share code, notes, and snippets.

View santosoide's full-sized avatar
💭
I may be slow to respond.

Edi Santoso santosoide

💭
I may be slow to respond.
View GitHub Profile
@santosoide
santosoide / tmux.cheat
Created March 7, 2017 12:24 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@santosoide
santosoide / user.js
Created March 3, 2017 02:27 — forked from timstermatic/user.js
Example of using bcrypt with mongoose middleware to enforce password hashing with bcrypt on save.
var mongoose = require('mongoose'),
Schema = mongoose.Schema
var bcrypt = require('bcrypt')
@santosoide
santosoide / gist:73e0ecc0f7a58592bce147b48b96e665
Created February 28, 2017 04:02 — forked from osipov/gist:c2a34884a647c29765ed
Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt
@santosoide
santosoide / gist:75d763c7091f43dac299f6fd6abaa399
Created February 28, 2017 04:02 — forked from bigsnarfdude/gist:b2eb1cabfdaf7e62a8fc
ubuntu 14.04 install scala 2.11.7 and sbt 13.9 and java 8 and git
# scala install
wget www.scala-lang.org/files/archive/scala-2.11.7.deb
sudo dpkg -i scala-2.11.7.deb
# sbt installation
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get update
sudo apt-get install sbt
@santosoide
santosoide / slackpost
Created February 19, 2017 04:01 — forked from dopiaza/slackpost
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
@santosoide
santosoide / tmux-cheatsheet.markdown
Created January 19, 2017 02:49 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@santosoide
santosoide / tmux_install.sh
Created January 19, 2017 02:31 — forked from P7h/tmux__CentOS__build_from_source.sh
tmux 2.0 and tmux 2.3 installation steps for Ubuntu
# tmux v2.3 installation steps for Ubuntu [various OS versions]
sudo apt-get update -yqqu
sudo add-apt-repository -yu ppa:pi-rho/dev
sudo apt-get update -yqqu
sudo apt-get install -yqqu python-software-properties software-properties-common
sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu16.04.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu15.10.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu15.04.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu14.04.1
@santosoide
santosoide / post-receive
Created November 2, 2016 06:57 — forked from janosgyerik/post-receive
A post-receive hook that runs a script if changes were pushed to a specific branch. (Hook scripts are in the hooks/ directory of a Git repository, and must be executable.)
#!/bin/sh
# 1. Create symlinks to the real upgrade scripts for each branch, for example:
# ./upgrade-beta.sh # will only be called when "beta" branch is updated
# ./upgrade-prod.sh # will only be called when "prod" branch is updated
#
# 2. Put these symlinks in the repository root, NOT in the hooks/ directory
# the post-receive hook receives parameters on stdin
while read oldrev newrev refname
@santosoide
santosoide / post-receive
Created November 2, 2016 06:51 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@santosoide
santosoide / collection-of-linux-commands.md
Last active October 25, 2017 13:17
collection of linux commands

collection of linux commands


Install git

sudo apt-get install git-all

Install Python v2.7.5