Skip to content

Instantly share code, notes, and snippets.

View ElectricPrism's full-sized avatar

ElectricPrism ElectricPrism

View GitHub Profile

README

This is a CentOS-themed /etc/issue w/ hooks to update IP address and OS release upon ifup/ifdown. My motivation was that I was tired of logging into an otherwise headless box just to find the IP of the system so I can SSH to it.

Note
The issue.in file actually contains control characters to do the color in the text. The easiest way to preserve that is to clone this gist and run the install.sh script w/ sudo, which will copy the file and set the SELinux
@Shaltz
Shaltz / gist:cc3ba9d2e0b7971c54c3
Last active June 17, 2021 08:34
remap caps lock into the super (windows) key on Linux (Gnome-Shell)
setxkbmap -option caps:super
Other example :
setxkbmap -option caps:escape
TO GET IT PERMANENTLY :
put it in : ~/.bash_proflie or ~/.profile
or in gnome-tweak, select "Make CapsLock an additional Super Key" in
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"