Skip to content

Instantly share code, notes, and snippets.

MOHAN M U mohan-mu

Block or report user

Report or block mohan-mu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
@mohan-mu
mohan-mu / osascript.rb
Created Aug 15, 2017 — forked from jpalumickas/osascript.rb
Osascript examples
View osascript.rb
# === Terminal.app === #
# Open new tab in terminal.
exec("osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' > /dev/null 2>&1 ")
# Open directory
exec("osascript -e 'tell application \"Terminal\" to do script \"cd directory\" in selected tab of the front window' > /dev/null 2>&1 ")
# Open directory in new tab (this is better)
exec("osascript -e 'tell application \"Terminal\"' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'do script with command \"cd directory && clear\" in selected tab of the front window' -e 'end tell' > /dev/null 2>&1")
View regular-expressions.cheatsheet.coffee
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
You can’t perform that action at this time.