Skip to content

Instantly share code, notes, and snippets.

Avatar

MOHAN M U mohan-mu

View GitHub Profile
@mohan-mu
mohan-mu / uuid_v4.js
Created Jul 17, 2020 — forked from bentranter/uuid_v4.js
Spec Compliant UUIDv4 Generator using the Web Crypto API
View uuid_v4.js
// 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
@mohan-mu
mohan-mu / 2019-https-localhost.md
Created Apr 20, 2020 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains
View 2019-https-localhost.md

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 / awesome + mxlinux.md
Created Jul 21, 2019
Configuring `awesome WM ` in `MX Linux`
View awesome + mxlinux.md

Configuring awesome WM in MX Linux

  1. Install awsome
    sudo apt-get install awesome -y
    
    awesome -y
  2. Deactivate Xubuntu's window manager
    • Open 'Session and Startup', and go to the 'Session' tab.
@mohan-mu
mohan-mu / lxde-rc.xml
Created Apr 22, 2018
lxde config file
View lxde-rc.xml
<?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 / rc.xml
Last active Apr 22, 2018
Openbox keybindings configuration
View rc.xml
<?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 / rc.lua
Last active Apr 22, 2018
Awesome configuration file with custom widget and keybindings
View rc.lua
-- 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")
View band
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
View Jack's
sudo i -t nat -A POSTROUTING -o th -j MASQUERADE
S I -t nat -A PREROUTING -i th -j DNAT --to-destination thip
View login.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OracleClient;
View bash_aliases.sh
#opens the files containing the computer network related stuff
alias cn='nautilus /media/mohan/Stuffs/Learning/CN && nautilus /media/mohan/Stuffs/Learning/Videos && nautilus /media/mohan/Recent/3rd\ SEM\ RVCE\ Study\ stuff/'
#for hibernating
alias hib_custom='gksudo pm-hibernate'
#set text to clipboard
alias setclip="xclip -selection c"
#get contents of clipboard
You can’t perform that action at this time.