Skip to content

Instantly share code, notes, and snippets.

View malikbenkirane's full-sized avatar

Malik Benkirane malikbenkirane

View GitHub Profile
#!/bin/sh -e
rm -vrf ~/Library/Preferences/Ableton/
rm -vrf ~/Library/Preferences/Ableton/
rm -vrf ~/Library/Application Support/Ableton/
rm -vrf ~/Library/Caches/Ableton/
rm -vrf ~/Library/Preferences/com.ableton.live.*
rm -vrf ~/Library/Application Support/Propellerhead Software/ReWire/'Ableton Live Engine'*
@malikbenkirane
malikbenkirane / reading_time.js
Created August 6, 2023 08:25
Get reading time with nodejs
const url = "https://sourcehut.org/blog/2020-04-20-prioritizing-simplitity/";
const readingTime = require('reading-time');
const innertext = require('innertext');
const https = require('https');
https.get(url, function(res) {
console.log(res.statusCode);
res.setEncoding('utf8');
res.on('data', function(data) {
alias gi="git add -i"
alias gv="git commit -v"
g() {
case $1 in
ai)
git add -i
;;
a)
git commit -v --amend
;;
@malikbenkirane
malikbenkirane / solarized_hex.html
Created June 21, 2023 17:58
hexadecimal and rgb solarized with vanilla javascript and html
<html>
<body>
<div style="display:flex;justify-content:space-around">
<div>
<h1>11</h1>
<div style="display:flex">
<div style="background-color:rgb(15,38,47);width:20px;height:20px"></div>
<div id="rgb_15_38_47">(15,38,47)</div>
" Essentials
let mapleader = ","
syntax on
set nu ru et
set ts=2 sts=2 sw=2
set cursorline
set hlsearch
set nocompatible
filetype off
{
"version": 1,
"notes": "",
"documentation": "stick to https://docs.qmk.fm (=\n",
"keymap": "crkbd_rev1_malik",
"keyboard": "crkbd/rev1",
"layout": "LAYOUT_split_3x5_3",
"layers": [
[
"KC_Q", "KC_W", "KC_E", "KC_R", "KC_T",
@malikbenkirane
malikbenkirane / proxy.go
Created January 15, 2021 10:35 — forked from ericflo/proxy.go
Golang TCP Proxy
package proxy
import (
"io"
"net"
"sync"
log "github.com/Sirupsen/logrus"
)
@malikbenkirane
malikbenkirane / mobile-fisrt.css
Last active April 7, 2020 10:15
Although media queries are triggering a lot of disputes among frontend developers, thanks you FrontendMasters for this media queries glossary https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
/* Thanks to https://css-tricks.com/snippets/css/media-queries-for-standard-devices */
/* iPhones */
/* ----------- iPhone 4 and 4S ----------- */
/* Portrait and Landscape */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
head
script(src="https://unpkg.com/vue/dist/vue.js")
script(src="https://unpkg.com/vue-router/dist/vue-router.js")
body
header.flex.space-evenly.rrv.color3.bg-color5(unselectable="on")
img(src="https://i.postimg.cc/PxVKkvJF/75-B7-E4-CB-4623-4-F71-9-CB1-538-E9-F9-C900-D.png")
div.flex.col.space-evenly
div.flex.flex-end
div.flex-grow-1
div.flex-grow-1