Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Typing on a Colemak keyboard layout

Salif Mehmed salif

💻
Typing on a Colemak keyboard layout
  • open to work
  • Kardzhali, Bulgaria
View GitHub Profile
@salif
salif / script.sh
Created Jul 22, 2022
Linux Esperanto locales
View script.sh
mkdir -p /tmp/eo_locale
find /usr/share/locale/eo/LC_MESSAGES/ -name '*.mo' | xargs -I "{}" sh -c "msgunfmt {} >> /tmp/eo_locale/\$(basename {})"
cd /tmp/eo_locale
@salif
salif / console-script.js
Created Jul 16, 2022
Clear Memrise List; Remove all words
View console-script.js
var s_a;
function s_f() {
const s_b = document.querySelector('i[data-role="remove"');
if (s_b == undefined) {
clearInterval(s_a);
return;
}
s_b.click();
document.querySelector('a[tabIndex="4000"]').click();
}
@salif
salif / README.md
Created Jul 13, 2022
Transliterate a Web Page
View README.md

Example

transliterate_page({ "Ĉ": "Cx", "Ĝ": "Gx", "Ĥ": "Hx", "Ĵ": "Jx", "Ŝ": "Sx", "Ŭ": "Ux", "ĉ": "cx", "ĝ": "gx", "ĥ": "hx", "ĵ": "jx", "ŝ": "sx", "ŭ": "ux" })

Before transliteration

Ĉiuliteraĵo
@salif
salif / get_json.js
Created Feb 22, 2022
Get JSON with all words from pbd171.db
View get_json.js
const words = require('./temp.json')
const fs = require('fs')
for (let i = 0; i < words.length; i+=1904) {
const lcode = 'word_'+words[i].lan_code
for (let j = 0; j < 1904; j++) {
words[j][lcode] = words[i+j].word
}
}
@salif
salif / README.md
Created Nov 5, 2021
README template
View README.md

$TODO

Installation

  • Clone this repository
$TODO
View keybase.md

Keybase proof

I hereby claim:

  • I am salif on github.
  • I am salifm_ (https://keybase.io/salifm_) on keybase.
  • I have a public key ASA-FPLiI7Tx156koKlscfJlcMU6md-SI-rznIAgb3b_9Ao

To claim this, I am signing this object:

@salif
salif / README.md
Created Jun 15, 2021
Calibre | Replace Liberation font with different font on Arch Linux
View README.md

Remove ttf-liberation

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

Option 1: noto-fonts

@salif
salif / sort.kt
Created May 29, 2021
Kotlin sort Array<Int>
View sort.kt
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 / 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
@salif
salif / 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)