Skip to content

Instantly share code, notes, and snippets.

View ahkohd's full-sized avatar
🔨
building

Victor Aremu ahkohd

🔨
building
View GitHub Profile
@enepomnyaschih
enepomnyaschih / base64.js
Last active April 25, 2025 08:01
https://www.npmjs.com/package/byte-base64 - Encode JS Uint8Array, simple array of bytes or native JS string to base64 and back
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active August 22, 2025 16:38
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
function ObjectToUrlEncode(data)
{
return Object.entries(data).reduce((accumulator, current) => {
return `${accumulator}&${current[0]}=${current[1]}`;
}, '').substring(1);
}
console.log(ObjectToUrlEncode({name: "victor", age: 12, line: 13}));
// OUTPUT: "name=victor&age=12&line=13"
@quaternioninterpolation
quaternioninterpolation / ImageDOCrossfade.cs
Last active January 21, 2025 06:57
DOTween UnityEngine.UI.Image image cross fade
/** --
** Copyright (C) 2019 by Josh van den Heever
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
** the Software without restriction, including without limitation the rights to
** use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
** of the Software, and to permit persons to whom the Software is furnished to
** do so, subject to the following conditions:
**
@nlharri
nlharri / rxjs-eventemitter.js
Last active October 19, 2022 10:30
RxJS Tutorial - Event Emitter for Node JS
var EventEmitter = require('events').EventEmitter;
const { Observable, fromEvent } = require('rxjs');
var emitter = new EventEmitter();
var source = fromEvent(emitter, 'data');
var subscription = source.subscribe(
(x) => console.log('Next: ' + x),
(err) => console.log('Error: ' + err),
@denisgolius
denisgolius / generate-ssh-key.sh
Created October 4, 2018 06:55 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@golanlevin
golanlevin / sketch.js
Created September 30, 2018 01:43
PoseNet skeletons with ml5.js & p5.js, using a pre-loaded video
// Copyright (c) 2018 ml5
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
/* ===
ml5 Example
PoseNet example using p5.js
=== */
@BananaAcid
BananaAcid / electron_paths_compared_win_osx.txt
Last active July 14, 2023 08:20
electron paths compared - win + osx
Test App:
https://github.com/BananaAcid/Simple-Electron-Kiosk/blob/master/PATH%20RESULTS
------------------------------------------------------------------------------------
electron paths
__dirname refers to index.mjs (parallel to loader.babel.js)
Be aware of globally installed modules - for unpacked.
@SagiMedina
SagiMedina / ImageTools.js
Last active September 7, 2024 04:39
Resize and crop images in the Browser with orientation fix using exif
import EXIF from 'exif-js';
const hasBlobConstructor = typeof (Blob) !== 'undefined' && (function checkBlobConstructor() {
try {
return Boolean(new Blob());
} catch (error) {
return false;
}
}());
@agrcrobles
agrcrobles / android_instructions_29.md
Last active February 15, 2025 21:03 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?