Skip to content

Instantly share code, notes, and snippets.

View ArcQ's full-sized avatar

Eddie Law ArcQ

  • Parallel Studios Inc.
  • Toronto
View GitHub Profile
@ArcQ
ArcQ / kill-all-connections-to-db.sql
Created September 25, 2020 04:45 — forked from jeffjohnson9046/kill-all-connections-to-db.sql
How to kill all connections to a Postgres database
-- Accepted answer from here: https://stackoverflow.com/questions/5408156/how-to-drop-a-postgresql-database-if-there-are-active-connections-to-it
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = '[your database name goes here]'
AND pid <> pg_backend_pid();
{
"tsserver.npm": "/Users/eddielaw/.nvm/versions/node/v12.9.1/bin/npm ",
"coc.preferences.diagnostic.displayByAle": true,
"coc.preferences.diagnostic.enable": false,
"javascript": {
"validate.enable": false,
"format": {
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true
}
},
@ArcQ
ArcQ / archinstall.md
Created April 6, 2020 09:25 — forked from xtrymind/archinstall.md
Windows 10 and Arch Linux dual boot with UEFI

Arch Linux installation (Windows 10 dual boot)

Before

  1. Disable Windows Fast-Startup
  2. Disable Secure Boot

Partitioning

set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
set surround
set showmatch
set relativenumber
set nowrap
nnoremap + 40<c-w>>
nnoremap - 40<c-w><
### Keybase proof
I hereby claim:
* I am arcq on github.
* I am arcq (https://keybase.io/arcq) on keybase.
* I have a public key ASDEM8_koo63IyQxG0z5mCoMOo4F7A9a7XL1EsfGhw_MNAo
To claim this, I am signing this object:
set -sg escape-time 0
set-option -g default-terminal "screen-256color"
bind h select-pane -L \; display-pane
bind j select-pane -D \; display-pane
bind k select-pane -U \; display-pane
bind l select-pane -R \; display-pane
bind-key H resize-pane -L 40
bind-key J resize-pane -D 40
bind-key K resize-pane -U 40
bind-key L resize-pane -R 40
@ArcQ
ArcQ / setup.sh
Last active December 19, 2016 23:58
Mac Setup Scripts
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
brew install vim
brew install tmux
git clone https://github.com/tomasr/molokai.git
mv molokai/ ~/.vim/colors/
#make sure to :PluginInstall for vundle
brew install cmake
cd ~/.vim/bundle/YouCompleteMe && ./install.py
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[user]
name = Eddie Law
email = eddielaw296@gmail.com
[core]
editor = /usr/local/Cellar/vim/7.4.2152/bin/vim
[alias]
@ArcQ
ArcQ / autoVimrc.py
Created October 23, 2016 21:37
WIP for auto updating vimrc for use between different machines
#Usage: python autoVimrc.py (pull || push)
import subprocess
import sys
import os.path
import getpass
def main():
funcStr = sys.argv[1]
globals()[funcStr]()
@ArcQ
ArcQ / .bashrc
Last active May 2, 2019 16:22
bash config file for mac environment
#terminal color
# export CLICOLOR=1
# export LSCOLORS=gxGxBxDxCxgggdxbxgxcxd
export TERM="xterm-256color"
PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\033[33;1m\]\w\[\033[m\]\$ '
# export GREP_OPTIONS-'--color=auto'
alias tmux='tmux -2'
source ~/.bin/tmuxinator.bash
alias ls='ls -a'