Skip to content

Instantly share code, notes, and snippets.

View salif's full-sized avatar

Salif Mehmed salif

View GitHub Profile
@salif
salif / README-Template.md
Created February 5, 2019 14:22 — forked from PurpleBooth/README-Template.md
A template to make good README.md

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.

Prerequisites

@salif
salif / encrypt-all.sh
Created April 8, 2019 22:23 — forked from johnnyopao/encrypt-all.sh
GPG Encrypt all files in directory
#!/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"
@salif
salif / code_style.md
Created June 5, 2019 20:05 — forked from jesseschalken/code_style.md
Code style

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.
@salif
salif / layout.kbd.json
Created December 16, 2019 12:12
Untitled Keyboard Layout
[
[
{
"a": 7,
"fa": [
6
],
"w": 1.25
},
"Tab",
@salif
salif / ЛИЦЕНЗ.txt
Created July 24, 2020 20:06
EUPL license in BG language, development version
ПУБЛИЧЕН ЛИЦЕНЗ НА ЕВРОПЕЙСКИЯ СЪЮЗ версия 1.2
EUPL © Европейски съюз 2007, 2016
Настоящият публичен лиценз на Европейския съюз (EUPL) се прилага към
произведението (както е определено по-долу), което се предоставя при условията
на този лиценз. Всяко ползване на произведението, различно от това, което е
позволено от настоящия лиценз, e забранено (до степента, в която такова ползване
е предмет на правата на притежателя на авторското право върху произведението).
Произведението се предоставя при условията на настоящия лиценз, когато
ff=$1
llc -filetype=obj $ff.ll
clang $ff.o -o $ff
@salif
salif / sserver.go
Last active September 16, 2020 13:43
Simple HTTP Server (Golang)
package main
import (
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"os"
)
func main() {
gin.SetMode(gin.ReleaseMode)
@salif
salif / update-contributors.sh
Last active October 9, 2023 19:03
Update the CONTRIBUTORS file
git shortlog -sn --no-merges | cut -f 2 > CONTRIBUTORS
@salif
salif / sort.kt
Created May 29, 2021 18:21
Kotlin sort Array<Int>
fun sort(array: Array<Int>): Array<Int> {
when {
array.size == 1 -> {
return array
}
array.size <= 2 -> {
val left = array[0]
val right = array[1]
return if (right < left) {
arrayOf(right, left)
@salif
salif / README.md
Created June 15, 2021 15:48
Calibre | Replace Liberation font with different font on Arch Linux

Remove ttf-liberation

sudo -i
pacman -Rdd ttf-liberation
rm /usr/share/calibre/fonts/liberation/Liberation*.ttf

Option 1: noto-fonts