Skip to content

Instantly share code, notes, and snippets.

View identityclash's full-sized avatar

Jerome A. C. Ngo identityclash

View GitHub Profile
@identityclash
identityclash / multiple_ssh_setting.md
Created January 8, 2019 18:22 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

It seems that it does not matter what timezone is on the server as long as you have the time set right for the current timezone, know the timezone of the datetime columns that you store, and are aware of the issues with daylight savings time.

On the other hand if you have control of the timezones of the servers you work with then you can have everything set to UTC internally and never worry about timezones and DST.

Here are some notes I collected of how to work with timezones as a form of cheatsheet for myself and others which might influence what timezone the person will choose for his/her server and how he/she will store date and time.

MySQL Timezone Cheatsheet

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.com
@identityclash
identityclash / README.md
Created October 30, 2016 15:42 — forked from denji/README.md
Remove settings and cli-links 0xDBE10, AppCode, CLion, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm (OS X & macOS)

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s

Quick backup JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-backup.sh | bash -s
@identityclash
identityclash / MySQL.md
Created September 20, 2016 12:59 — forked from nrollr/MySQL.md
Install MySQL on El Capitan using Homebrew

Install MySQL on OS X El Capitan

Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault : bash <(curl -Ls http://git.io/eUx7rg)

However, at the time of writing the script is not compatible with OS X El Capitan (10.11)

Install MySQL using Homebrew

An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"

Make sure Homebrew has the latest formulae, so run brew update first

@identityclash
identityclash / README.md
Created September 16, 2016 12:49 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@identityclash
identityclash / gist:657d167fb15a0e7924f5
Last active November 12, 2015 07:24
nodejs 4.x and npm installation for ubuntu 14.04 LTS
curl -sL https://deb/nodesource.com/setup_4.x | sudo -E bash -
curl -sL https://www.npmjs.com/install.sh | sh
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
@identityclash
identityclash / gist:14fafb8f48120701a56c
Last active November 12, 2015 07:59
redis 3.0.5 installation for ubuntu 14.04
sudo apt-get update
sudo apt-get install build-essential
wget http://download.redis.io/releases/redis-3.0.5.tar.gz
tar xzf redis-3.0.5.tar.gz
cd redis-3.0.5
make
make test
sudo make install
cd utils
sudo ./install_server.sh
@identityclash
identityclash / dynamodb-params.js
Created November 11, 2015 06:13 — forked from genediazjr/dynamodb-params.js
DynamoDB JSON parameter templates
var createTable = {
TableName: 'STRING_VALUE', /* required */
ProvisionedThroughput: { /* required */
ReadCapacityUnits: 0, /* required */
WriteCapacityUnits: 0 /* required */
},
KeySchema: [ /* required */
{AttributeName: 'STRING_VALUE', KeyType: 'HASH | RANGE'}, /* required */
/* more items */
],