Skip to content

Instantly share code, notes, and snippets.

@mohan-mu
mohan-mu / band
Last active December 1, 2017 06:44
I
i -L -t tan
proc/sys/net/ipv4/ip_forward
s route add default gw ip
sudi i -t nat -A POSTROUTING -o tf MASQUERADE
i -L -t nat
S I -t nat -A PREROUTING -i th -j DNAT --to-destination thip
@mohan-mu
mohan-mu / rc.lua
Last active April 22, 2018 23:23
Awesome configuration file with custom widget and keybindings
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
@mohan-mu
mohan-mu / rc.xml
Last active April 22, 2018 23:06
Openbox keybindings configuration
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@mohan-mu
mohan-mu / lxde-rc.xml
Created April 22, 2018 23:13
lxde config file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@mohan-mu
mohan-mu / awesome + mxlinux.md
Created July 21, 2019 04:33
Configuring `awesome WM ` in `MX Linux`

Configuring awesome WM in MX Linux

  1. Install awsome
    sudo apt-get install awesome -y
    
    awesome -y
    • Open 'Session and Startup', and go to the 'Session' tab.
@mohan-mu
mohan-mu / 2019-https-localhost.md
Created April 20, 2020 13:01 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@mohan-mu
mohan-mu / uuid_v4.js
Created July 17, 2020 11:10 — forked from bentranter/uuid_v4.js
Spec Compliant UUIDv4 Generator using the Web Crypto API
// uuid returns an RFC 4122 compliant universally unique
// identifier using the crypto API
function uuid() {
// get sixteen unsigned 8 bit random values
var u = window
.crypto
.getRandomValues(new Uint8Array(16));
// set the version bit to v4