Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Typing on a Colemak keyboard layout

Salif Mehmed salifm

💻
Typing on a Colemak keyboard layout
View GitHub Profile
@salifm
salifm / update-contributors.sh
Created Sep 22, 2020
Update the CONTRIBUTORS file
View update-contributors.sh
git shortlog -sne --no-merges | cut -d$'\t' -f 2- > CONTRIBUTORS
@salifm
salifm / install-arch-linux.sh
Last active Sep 20, 2020
Install Arch Linux
View install-arch-linux.sh
#!/usr/bin/sh
# Load Colemak keyboard layout
loadkeys colemak
# Connect to Wi-Fi
iwctl --passphrase passphrase station device connect SSID
timedatectl set-ntp true
@salifm
salifm / sserver.go
Last active Sep 16, 2020
Simple HTTP Server (Golang)
View sserver.go
package main
import (
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"os"
)
func main() {
gin.SetMode(gin.ReleaseMode)
View llvm.sh
ff=$1
llc -filetype=obj $ff.ll
clang $ff.o -o $ff
@salifm
salifm / ЛИЦЕНЗ.txt
Created Jul 24, 2020
EUPL license in BG language, development version
View ЛИЦЕНЗ.txt
ПУБЛИЧЕН ЛИЦЕНЗ НА ЕВРОПЕЙСКИЯ СЪЮЗ версия 1.2
EUPL © Европейски съюз 2007, 2016
Настоящият публичен лиценз на Европейския съюз (EUPL) се прилага към
произведението (както е определено по-долу), което се предоставя при условията
на този лиценз. Всяко ползване на произведението, различно от това, което е
позволено от настоящия лиценз, e забранено (до степента, в която такова ползване
е предмет на правата на притежателя на авторското право върху произведението).
Произведението се предоставя при условията на настоящия лиценз, когато
View keybase.md

Keybase proof

I hereby claim:

  • I am salifm on github.
  • I am salifm_ (https://keybase.io/salifm_) on keybase.
  • I have a public key ASB_LlNbRmg16kSvwCNSyA26Q4sExsaZGlK-ushe_NuVYAo

To claim this, I am signing this object:

@salifm
salifm / vps.html
Last active May 2, 2020
vps.html. Downloaded from Reddit with Brave browser for no reason
View vps.html
<!doctype html><html><head><script src="/pagead/gadgets/html5/api/exitapi-impl.js" type="text/javascript"></script><script src="/pagead/gadgets/html5/addata.js" type="text/javascript"></script><meta charset="utf-8"><meta content="width=300,height=250" name="ad.size"><link href="https://fonts.googleapis.com/css?family=Roboto" rel=stylesheet><style>body {margin:0;} #A,#B,#C,#D,#E,#F,#G,#H,#I,#J,#K,#L,#M,#N,#O,#P,#Q,#R,#S,#T,#U,#V,#W,body,html{transform-origin:0 0;} #A,#B,#C,#D,#F,#H,#V,#W,body,html{height:250px;width:300px;} #A,body{outline-color:rgb(34, 34, 34);} #B,#C,#D,#E,#F,#G,#H,#I,#J,#K,#L,#M,#N,#O,#P,#Q,#R,#S,#T,#U,#V,#W{outline-color:rgb(255, 255, 255);} #B,#D,#F,#H,#P,#Q,#R{background-repeat:no-repeat;} #B,#I,#L,#M,#S,#T,#W{box-sizing:border-box;} #B,#I,#L,#T{position:relative;} #B,#T{overflow-x:hidden;overflow-y:hidden;} #B,#V{background-color:rgb(2, 37, 72);} #B{-webkit-text-emphasis-color:rgb(255, 255, 255);-webkit-text-fill-color:rgb(255, 255, 255);-webkit-text-stroke-color:rgb(255, 255, 255);bac
@salifm
salifm / layout.kbd.json
Created Dec 16, 2019
Untitled Keyboard Layout
View layout.kbd.json
[
[
{
"a": 7,
"fa": [
6
],
"w": 1.25
},
"Tab",
View code_style.md

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
salifm / encrypt-all.sh
Created Apr 8, 2019 — forked from johnnyopao/encrypt-all.sh
GPG Encrypt all files in directory
View encrypt-all.sh
#!/bin/bash
# This uses gpg to encrypt every file in a directory as separate
# encrypted files
# Usage
# ./encrypt-all.sh ./dir-of-files-to-encrypt "PASSPHRASE"
FILES="$1"
PASSPHRASE="$2"
You can’t perform that action at this time.