Zaid Annas
Devsinc inc. 30/08/2018
/* | |
################################################################ | |
# Nhân quả không nợ chúng ta thứ gì, cho nên xin đừng oán giận # | |
# _ # | |
# _ooOoo_ # | |
# o8888888o # | |
# 88" . "88 # | |
# (| -_- |) # | |
# O\ = /O # |
#!/bin/bash | |
# HOW TO USE: Copy this file to `.git/hooks` in your project directory. | |
remote_url="$2" | |
warning="[Warning] Don't push the project' source code to GitHub unless you are allowed." | |
policy_url="Rikkeisoft's IPR Regulation: https://rikkei.vn/help/view/97" | |
prompt_user() { | |
echo $warning |
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
# solve the arrows mess when using vim in tmux | |
set -g default-terminal "xterm-256color" | |
# use mouse to scroll the output page instead of the command history | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' |
First, run:
$ composer config --list --global //this will get the composer home path.
[home] /root/.composer //it's my composer home path.
And then, edit the config.json in [home]
directory, make it like this:
{
"config": {
"github-protocols": [
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
config_server "https://etcd.local:2379" | |
service users { | |
endpoint: "/users", | |
proxy: "{{services.users.ip}}:{{services.users.port}}" | |
} | |
# In this example 'services.users' would be a directory with a json key for every user service container / application. | |
# Using this we could template the proxy and any other information in the services block, and it would just work with caddy. |
# Install | |
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# Update |
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |