Skip to content

Instantly share code, notes, and snippets.

@saravanaskanda
saravanaskanda / tmux.conf
Created November 19, 2019 05:10 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@saravanaskanda
saravanaskanda / tmux-cheatsheet.markdown
Created January 7, 2020 06:53 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
Mac Network Commands Cheat Sheet
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty.
Get an ip address for en0:
ipconfig getifaddr en0
Same thing, but setting and echoing a variable:
@saravanaskanda
saravanaskanda / openstack_user_config.yml
Created April 19, 2020 18:42 — forked from cloudnull/openstack_user_config.yml
Minimal OpenStack-Ansible config using low spec gear.
---
cidr_networks:
container: "172.16.26.0/24"
tunnel: "172.29.240.0/22"
storage: "172.29.244.0/24"
used_ips:
- "172.16.26.1,172.16.26.50"
- "172.16.26.100,172.16.26.200"
---
# Setup according to Blogpost "Full Stack automation with Ansible and OpenStack". Execute with "ansible-playbook ansible-openstack-blogpost.yml -c local -vv"
# #
# #
# #
- name: Execute the Blogpost demo tasks
hosts: localhost
tasks:
- name: Download cirros image
get_url:
@saravanaskanda
saravanaskanda / clean-up-boot-partition-ubuntu.md
Created June 16, 2020 08:13 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@saravanaskanda
saravanaskanda / linux_fun.md
Created October 1, 2020 03:29 — forked from zlorb/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Install figlet [3] via : sudo apt-get install figlet
  4. Make sure you have Ruby installed via : ruby -v
  5. Install the lolcat [2] via : gem gem install lolcat
  6. (option) Add to .bash_profile and/or .bashrc
@saravanaskanda
saravanaskanda / sed cheatsheet
Created December 22, 2020 08:30 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@saravanaskanda
saravanaskanda / install.sh
Created July 12, 2021 09:20 — forked from adduc/install.sh
My installation of mercurial, tortoisehg, and hg-git on Ubuntu 20.04 and newer
#!/bin/bash
TARGET_DIR=/opt/repos/third-parties
HG_GIT_VERSION=${1:-default}
HG_RELEASE_VERSION=${2:-5.5.2}
HG_REPO_VERSION=${3:-stable}
TORTOISEHG_VERSION=${4:-stable}
update() {
# Update packages