Skip to content

Instantly share code, notes, and snippets.

@sankarara
sankarara / install.sh
Created October 18, 2018 19:45 — forked from yuvadm/install.sh
Arch Linux installation on Lenovo ThinkPad X200s
# Arch Linux installation procedure on a Lenovo ThinkPad X200s
# BIOS boot (no UEFI), SSD + LVM + LUKS + TRIM + discards
# Randomize (or zero) drive contents
dd if=/dev/urandom of=/dev/sda
# Create GPT and partitions
# Use gdisk to ensure proper partition alignment
gdisk /dev/sda
# 100MB boot partition on /dev/sda1 type 8300
@sankarara
sankarara / hex_00_to_FF
Created July 20, 2018 20:16 — forked from BuffaloWill/hex_00_to_FF
hex 00 to FF
00
01
02
03
04
05
06
07
08
09
@sankarara
sankarara / i3-cheat-sheet.md
Created June 28, 2018 13:45 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
@sankarara
sankarara / clean-up-boot-partition-ubuntu.md
Created July 11, 2017 16:15 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

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

Reference

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

1. Check the current kernel version

$ uname -r 
@sankarara
sankarara / simple_convert.py
Created December 2, 2016 20:58 — forked from onedr0p/simple_convert.py
A simple script to convert media files to MP4 for a better Plex experiance
import os
import sys
import time
import platform
import subprocess
import urllib2
import logging
""" Are we windows or linux """
is_windows = any(platform.win32_ver())

default.conf

server {
    listen 443;
    server_name homelab.example.com;

    access_log /var/log/nginx/homelab.example.com.access.log;
    error_log /var/log/nginx/homelab.example.com.error.log;

root /var/www/html;

# Hosts file for Pi-Hole
@sankarara
sankarara / monitor-off.ahk
Created March 23, 2016 14:29
AutoHotKey: Turn monitor off with a keyboard shortcut
; This is part of my AutoHotkey [1] script that turns off my monitor when I
; press Win+\.
; It also turns the screensaver on at the same time, so that Windows Live
; Messenger (and any other programs) know I am away.
; I don't have a password on my screensaver, so there is a second version
; (Win+Shift+\) that locks the PC as well.
; Note: Sometimes the monitor comes back on after a second and I have to