Skip to content

Instantly share code, notes, and snippets.

View coderick14's full-sized avatar
💭
Learning to prevent outages

Deep Bhattacharyya coderick14

💭
Learning to prevent outages
View GitHub Profile
#
# _
# | | |
# | |___ ___ ___ | ___ _ ___ ___
# | _ \ / __\ / \ |/ \ |/ \ / \
# | |_| | / | \___ | | | |
# |____/ \__/\ ___\ | |_ | \____/
#
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
@coderick14
coderick14 / config
Last active November 24, 2019 13:18
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@coderick14
coderick14 / erew_merge.go
Last active October 19, 2017 11:21
EREW MERGE ALGORITHM
package main
import (
"fmt"
"math"
"sort"
"sync"
)
type quad struct {
@coderick14
coderick14 / crew_merge.go
Created October 19, 2017 10:56
CREW MERGE ALGORITHM
package main
import (
"fmt"
"math"
"sort"
"sync"
)
type triplet struct {
@coderick14
coderick14 / aliases
Last active July 6, 2017 23:29
Shell aliases
################################################ system aliases ###########################################
alias install="sudo apt-get install"
alias update="sudo apt-get update"
alias uninstall="sudo apt-get remove --purge"
alias upgrade="sudo apt-get upgrade"
alias pys="python -m SimpleHTTPServer"
alias lhost="cd /var/www/html"
alias showlog="tail -f /var/log/syslog"
alias batstats="upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E 'state|time\ to\ empty|time\ to\ full|percentage|capacity'"
alias ls="ls -l"
@coderick14
coderick14 / makerules.sh
Last active June 29, 2017 15:33
Mounting video ports at specific dev paths
#!/bin/bash
choice=1
filename="10-new-webcam.rules"
touch $filename
read -p "Create new rules file or modify the existing one? (0/1) : " ch
if [ $ch -eq 1 ]; then
sudo cp /etc/udev/rules.d/10-webcam.rules $filename
else
@coderick14
coderick14 / .vimrc
Last active February 19, 2018 11:48
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" _
" __ _(_)_ __ ___ _ __ ___
" \ \ / / | '_ ` _ \| '__/ __|
" \ V /| | | | | | | | | (__
" \_/ |_|_| |_| |_|_| \___|
"
" Created by Gokul Srinivas <gokusrinivas@gmail.com>
" https://github.com/GokulSrinivas
"
@coderick14
coderick14 / setup_pi.sh
Last active June 29, 2017 20:58
Raspberry Pi setup script for SBHS servers
#!/bin/bash
cd /home/pi
echo "Initializing Raspberry Pi setup..."
#sudo apt-get update > setup_pi.log
sudo unlink /etc/localtime
sudo ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
# Install git