Skip to content

Instantly share code, notes, and snippets.

Typing on a Colemak keyboard layout

Salif Mehmed salifm

Typing on a Colemak keyboard layout
Block or report user

Report or block salifm

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
salifm / layout.kbd.json
Created Dec 16, 2019
Untitled Keyboard Layout
View layout.kbd.json
"a": 7,
"fa": [
"w": 1.25
salifm / trim_space.c
Created Jun 29, 2019 — forked from kenkam/trim_space.c
A simple function to trim some space off a string in C
View trim_space.c
char * trim_space(char *str) {
char *end;
/* skip leading whitespace */
while (isspace(*str)) {
str = str + 1;
/* remove trailing whitespace */
end = str + strlen(str) - 1;
while (end > str && isspace(*end)) {
end = end - 1;
View gist:9c5f0a5e1a089d3020d33902d8558f6b
polybar config
type = custom/script
exec = ~/scripts/
interval = 5
click-left = ~/scripts/ --popup
format-background = ${colors.alt-background}
format-foreground = ${colors.alt-foreground}
label = %output:25%

My preferred code style is 2-space K&R. This is intended to provide a justification for this style.

Why K&R?

K&R style has the following properties:

  1. Provides symmetric size (in terms of screen space consumed) between the opening and closing syntax of a clode block.
  2. Forces no empty/meaningless lines, thereby avoiding artificial distance between related things that should be together.
  3. Consumes the minimum vertical space while keeping the opening and closing syntax of the block on separate lines from the content.
salifm / noscript-tracking.go
Created May 10, 2019 — forked from wybiral/noscript-tracking.go
Tracking cursor position in real-time with remote monitoring (without JavaScript)
View noscript-tracking.go
// Tracking cursor position in real-time without JavaScript
// Demo:
package main
import (
salifm /
Created Apr 19, 2019 — forked from dangkhoasdc/
Things to do after install Arch Linux
#!/usr/bin/env bash
# Things to do after install ArchLinux (2012.12.01)
pacman --noconfirm -S sudo
# Enabled archlinuxfr repo
arch=$(uname -m)
sudo cp /etc/pacman.conf /etc/pacman.conf.bak
echo "" >> /etc/pacman.conf
echo "[archlinuxfr]" >> /etc/pacman.conf
salifm /
Created Apr 8, 2019 — forked from johnnyopao/
GPG Encrypt all files in directory
# This uses gpg to encrypt every file in a directory as separate
# encrypted files
# Usage
# ./ ./dir-of-files-to-encrypt "PASSPHRASE"

XAMPP Launcher

Create file XAMPP.desktop and make it contain:

[Desktop Entry]
salifm / language-sampleGrammar.cson
Created Mar 17, 2019 — forked from DamnedScholar/language-sampleGrammar.cson
Grammar boilerplate with annotations.
View language-sampleGrammar.cson
# TextMate tutorial:
# Regex to convert keys to unquoted: '(include|match|captures|begin|end|beginCaptures|endCaptures|name|patterns|0|1|2|3|4|5|6|7|8|9|comment|fileTypes|scopeName|repository|contentName|firstLineMatch|foldingStartMarker|foldingStopMarker)':
scopeName: 'source.<scope>' # <scope> should be a short, unique indicator for the language ("js", "php", "c", etc.)
name: '<name>' # The title that will show up in grammar selection and on your status bar.
fileTypes: [ # An array of file extensions.
salifm /
Created Feb 5, 2019 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


You can’t perform that action at this time.