Skip to content

Instantly share code, notes, and snippets.

View AlanD20's full-sized avatar
🎯
Focusing

AlanD20 AlanD20

🎯
Focusing
View GitHub Profile
@AlanD20
AlanD20 / README.md
Last active April 14, 2023 09:03
Twitch Extensions Config / bttv / ffz

FFZ & BTTV Config File

@AlanD20
AlanD20 / _reset.scss
Created April 5, 2021 08:45
CSS reset
//https://piccalil.li/blog/a-modern-css-reset
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
@AlanD20
AlanD20 / Reverse_integer.ts
Last active April 2, 2022 15:01
Reverse integer - typescript - 80ms/100ms
function reverse(x: number): number {
const nums: string[] = [...(x.toString())];
const list: number[] = [];
const negative: boolean = nums[0] == '-' ? true : false;
if (negative) nums[0] = "\0";
nums.reverse().map(digit => {
if (digit == "\0") return;
list.push(Number(digit));
})
const result = Number(negative ? '-' + list.join('') : list.join(''));
@AlanD20
AlanD20 / README.md
Last active April 14, 2022 06:34
Fix latest windows 10 unreleasing ports after using it.

Release unreleased ports when Windows does not fully release them.

  • Don't forget to Restart your computer.
@AlanD20
AlanD20 / hashTable.js
Created March 14, 2021 17:07
Hash Table JS
function idk(key,size){
return [...key].map(x=>33*x.charCodeAt(0)%key.length).reduce((a,c)=>c+a);
}
console.log(idk('firstName', 113))
class table{
items = new Array(113);
setItem(key, value){
const idx= idk(key, this.items.length);
@AlanD20
AlanD20 / README.md
Last active September 23, 2023 20:19
Visual Studio Code Configuration / vscode / vs code / extensions / settings

VS Code Configuration

Export VSCode Extensions:

code --list-extensions | xargs -L 1 echo code --install-extension # Unix

code --list-extensions | % { "code --install-extension $_" } # Windows PowerShell

Shortcuts: