Skip to content

Instantly share code, notes, and snippets.

Simhyeon / .Xmodmap
Last active Apr 15, 2021
Xmodmap example
View .Xmodmap
! --------------<DESCRIPTION>-------------------
! I'm changing left alt key to mode switch and menu key to alt key.
! If i really need alt keys a lot, then I use normal key map for the time.
! Every keyname is represented as capital but not the capital in real use.
! If you want to change xmodmap by your flavor refer to the table in the bottom of this file.
! Also Arch wiki is a great resource.
! Keycode can be detected with xev command just open up your terminal and type xev to find out.
! Below is a short description for my keymappings
boreycutts /
Last active Apr 15, 2021
A simple installation guide for i3-gaps

Installing i3-gaps


i3-gaps has some packages that are required for it to work so install these things:

sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake

You also need to install libxcb-xrm-dev, but I got Unable to locate package libxcb-xrm-dev when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:

mkdir tmp
set -e
cd ~/Library/Containers/com.docker.docker/Data/database
git reset --hard
echo -n "Current full-sync-on-flush setting: "
if [ -f $P ]; then
echo "file exists"
tinogomes / gist:2476447
Created Apr 24, 2012
Open the Color Picker via AppleScript
View gist:2476447
# Open the Color Picker via AppleScript
tell application "System Events" to set _frontMostApp to (name of processes whose frontmost is true)
set _frontMostApp to item 1 of _frontMostApp
tell application _frontMostApp to activate
choose color
View defining-variables.go
package main
import "fmt"
func main() {
In formatted string,
%d stands for integers
cvan / webgl-detect-gpu.js
Last active Apr 15, 2021
use JavaScript to detect GPU used from within your browser
View webgl-detect-gpu.js
var canvas = document.createElement('canvas');
var gl;
var debugInfo;
var vendor;
var renderer;
try {
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
} catch (e) {
ole1986 /
Last active Apr 15, 2021
Traffic control script for incoming and outgoing packages using TC (on a specific ip address)
# Interface connect to out lan
# Interface virtual for incomming traffic
# set the direction (1 = outgoing only, 2 = incoming only 3 = both)
# Speed
Painezor /
Last active Apr 15, 2021
Built-in Checks for the commands extension of discord py
# Command cannot be used in private messages.
# Command can only be used in private messages.
# Command can only be used by the bot owner.