Skip to content

Instantly share code, notes, and snippets.

@Jaid
Jaid / _tipeee_socket_api_examples.md
Last active October 19, 2017 05:41
TipeeeStream socket.io API example events

These are example objects that are obtained by listening to TipeeeStream events.
More information here.

@Jaid
Jaid / test.sh
Last active November 24, 2018 05:25
echo "ABC" > $HOME/abc.txt
@Jaid
Jaid / add-ssh-user.sh
Last active November 24, 2018 09:02
Setup a new user for remote SSH from client
IP_ADDRESS="0.0.0.0"
EXISTING_REMOTE_USER=root
NEW_REMOTE_USER=user
# Authorize as root
ssh-copy-id $EXISTING_REMOTE_USER@$IP_ADDRESS
# Create user (no interaction needed)
echo "
adduser --disabled-password --gecos '' $NEW_REMOTE_USER
@Jaid
Jaid / setup-remote.bash
Last active November 27, 2018 14:59
Run a Bash script on a remote server via SSH and SCP
#!/usr/bin/bash
SCRIPT=/c/tmp/setup.bash
SSH_USER=jaid
SSH_HOST=example.com
scp $SCRIPT $SSH_USER@$SSH_HOST:~/local.bash
ssh $SSH_USER@$SSH_HOST "DEBIAN_FRONTEND=noninteractive PS4='[:\$LINENO] ' bash -e -x ~/local.bash"
@Jaid
Jaid / keybase.md
Created January 8, 2019 06:04
Keybase Verification

Keybase proof

I hereby claim:

  • I am jaid on github.
  • I am jaidchen (https://keybase.io/jaidchen) on keybase.
  • I have a public key whose fingerprint is 6922 43D6 580C 4583 929E 0D72 D2D4 37CD 3022 B929

To claim this, I am signing this object:

@Jaid
Jaid / .gitconfig
Last active March 8, 2019 01:11
My personal .gitconfig file
[user]
name = Jaid
username = jaid
email = [email protected]
signingKey = 692243D6580C4583929E0D72D2D437CD3022B929
[commit]
gpgsign = true
[core]
editor = nano
eol = lf
@Jaid
Jaid / npm-aliases.bash
Created January 21, 2019 07:27
Aliases for npm, pnpm, Yarn and Lerna. Little abstraction if their own CLI grammar with commands r, i, i-force, dep, dev, global and u.
alias npm-r="npm run"
alias npm-i="npm install"
alias npm-i-force="rm -rf node_modules && rm package-lock.json && npm-i"
alias npm-dep="npm install --save"
alias npm-dev="npm install --save-dev"
alias npm-global="npm install --global"
alias npm-u="npm uninstall"
alias pnpm-r="pnpm run"
alias pnpm-i="pnpm install --child-concurrency=8"
@Jaid
Jaid / .npmrc
Created January 22, 2019 12:25
My personal npmrc file
color=always
init-author-email="[email protected]"
init-author-name=Jaid
init-author-url="https://github.com/Jaid"
init-license="MIT"
msvs_version=2015
scripts-prepend-node-path=true
sign-git-commit=true
sign-git-tag=true
unicode=true
@Jaid
Jaid / renderers.md
Last active February 24, 2019 03:27
React Renderer projects