Skip to content

Instantly share code, notes, and snippets.

@KaKi87
KaKi87 / README.md
Last active September 4, 2024 10:00
dynapt experimental setup tutorial

dynapt — Experimental setup tutorial

Introduction

Welcome to the experimental setup tutorial for dynapt, the dynamic APT repository.

If you're reading this, you might be frustrated that an app you're using doesn't offer automated updates, by way of an APT repository, a PPA, or a Flatpak.

@KaKi87
KaKi87 / README.md
Last active August 31, 2024 14:18
transfer.sh instances
@KaKi87
KaKi87 / Awesome-FrOSS.md
Last active July 12, 2024 19:27
Liste inspirée par awesome de logiciels libres français. | Awesome-inspired list of French open source software.
@KaKi87
KaKi87 / audacity_forks.md
Last active February 5, 2023 21:21
Audacity forks

Audacity forks

| Name | Status | Repository | Website | Last Linux build | Last Windows build | Last Mac build | | :------------------------------ | :------- | :------------------------------------------------------------------------------------------------

@KaKi87
KaKi87 / trying-to-use-official-vuejs-libraries-with-browser-esm-cdn-imports.md
Created May 20, 2022 12:42
Trying to use official VueJS libraries with browser ESM CDN imports

Official VueJS libraries, e.g. vue-router, are simultaneously dependencies and dependents of vue, seemingly making those impossible to use with ESM CDN import statements without using <script type="importmap">, which isn't supported everywhere.

VueJS standalone boilerplates

Basic, working

Full code snippet :

Keybase proof

I hereby claim:

  • I am kaki87 on github.
  • I am kaki87 (https://keybase.io/kaki87) on keybase.
  • I have a public key ASBVux5-VAVoreRwBZHvwvaIoWgW5paogKtj8dF8XWH94wo

To claim this, I am signing this object:

@KaKi87
KaKi87 / isIpInCidr.js
Created February 20, 2020 17:36
Is IP in CIDR ?
const isIpInCidr = (ip, cidr) => {
const [range, bits = 32] = cidr.split('/');
const mask = ~(2 ** (32 - bits) - 1);
const ip4ToInt = ip => ip.split('.').reduce((int, oct) => (int << 8) + parseInt(oct, 10), 0) >>> 0;
return (ip4ToInt(ip) & mask) === (ip4ToInt(range) & mask);
};
/*
Source : https://tech.mybuilder.com/determining-if-an-ipv4-address-is-within-a-cidr-range-in-javascript/
*/
@KaKi87
KaKi87 / getParents.js
Last active February 20, 2020 07:43
Get all parents of HTML element
const getParents = element => {
const parents = [];
for (; element && element !== document; element = element.parentElement){
parents.push(element);
}
return parents;
};
/*
Source : https://gomakethings.com/how-to-get-all-parent-elements-with-vanilla-javascript/
@KaKi87
KaKi87 / clock.sh
Created August 19, 2019 20:30
Linux CLI large clock
#!/bin/bash
x=echo;e=d1s3d1;f=s2d1s2;g=d1s4;h=s4d1;i="1 d5";s=0;$x -e "\n\n\n\n\n\n\n"
set $i 7 $e $i 9 $f $i 3 $h $i 3 $g $i $i 3 $h $i 3 $h $i 4 $e $i 4 $h $i 3 \
$g $i 3 $h $i 4 $g $i 3 $e 2 d5 8 $h $i 3 $e $i 3 $e 2 d5 3 $e $i 4 $h 3 s1 \
1 d1 1 s1 1 d1 3 s1;y=" ";z="\033[";for l in {0..9} a;do for m in {0..8};do
if [ $s = 0 ];then s=$1;t=$2;shift 2;fi;s=$((s-1));p=$t;a="";while [ $p ];do
c=${p:0:1};n=${p:1:1};p=${p:2:9};[ $c = d ]&&a="$a${z}7m"
a="$a${y:0:$n}${y:0:$n}";[ $c = d ]&&a="$a${z}m";done;d[0x$l$m]="$a";done
done;while :;do set `date "+%Ha%Ma%S %N"`;t=$1;s=$2;$x -ne "\r${z}8A"
for l in {0..8};do for ((i=0;i<${#t};i++));do $x -ne "${d[0x${t:$i:1}$l]}"
@KaKi87
KaKi87 / xdaforums_threads_meta_userscript.js
Last active June 26, 2019 01:44
XDA Forums userscript : show threads meta in threads list
// ==UserScript==
// @name XDA Forums - Threads meta
// @namespace https://kaki87.net/
// @version 1.0
// @match https://forum.xda-developers.com/*
// @author KaKi87
// @license MIT
// ==/UserScript==
window.addEventListener('DOMContentLoaded', () => {