Skip to content

Instantly share code, notes, and snippets.

View Snazzyham's full-sized avatar

Soham Adwani Snazzyham

View GitHub Profile
@Snazzyham
Snazzyham / {pywal_template).spectrwm.conf
Last active June 28, 2021 07:11
A .spectrwm.conf template file for Pywal, which includes all my other needed config, while taking in colors from pywal
workspace_limit = 7
focus_mode = manual
focus_close = previous
focus_close_wrap = 1
focus_default = last
spawn_position = next
workspace_clamp = 1
warp_focus = 0
warp_pointer = 1
# an example nginx conf file for https using [this method](https://linode.com/docs/security/ssl/install-lets-encrypt-to-create-ssl-certificates/)
server {
listen 443;
server_name example.com www.example.com;
root /var/www/example.com/html;
index index.php index.html index.htm index.nginx-debian.html;
ssl on;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
@Snazzyham
Snazzyham / server-setup.sh
Created February 20, 2018 04:49
Set up a server with tmux, mosh, node and nginx.
#!/bin/bash
sudo apt-get install tmux
sudo apt-get install mosh
sudo apt-get install build-essential
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
export NVM_DIR="$HOME/.nvm"
@Snazzyham
Snazzyham / .vimrc
Created February 20, 2018 04:46
Minimal Vim Config for servers
:nnoremap <C-k> :wincmd k<CR>
:nnoremap <C-j> :wincmd j<CR>
:nnoremap <C-h> :wincmd h<CR>
:nnoremap <C-l> :wincmd l<CR>
inoremap " ""<ESC>ha
inoremap { {}<ESC>ha
inoremap ( ()<ESC>ha
set clipboard=unnamed
set tabstop=2 " tab spacing
set softtabstop=2 " unify tab spacing
@Snazzyham
Snazzyham / .tmux.conf
Last active February 20, 2018 04:43
Minimal Tmux Config for Servers
set -g mouse on
set-option -g allow-rename off
set-option -g prefix C-x
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"