Skip to content

Instantly share code, notes, and snippets.

const title_text = "π—œ'𝗺 π—œπ˜‡π˜‚π—Ίπ—Ά...!!";
const body_text = "π„π˜ππ™";
const source_url = "https://github.com/sataniceypz/Izumi-v2";
large_thumb = false; // use true for larger thumbnail
const logo = "https://i.imgur.com/4AKWozV.jpeg";
var audios = ["https://i.imgur.com/tceIGIW.mp4","https://i.imgur.com/v1bYXlb.mp4","https://i.imgur.com/cGJ1Gyi.mp4","https://i.imgur.com/6HXfyVr.mp4","https://i.imgur.com/dPjoh3s.mp4","https://i.imgur.com/pbtSy0M.mp4","https://i.imgur.com/sDwfg29.mp4","https://i.imgur.com/8vhaz82.mp4"];
// ===================================================================================
// EZRA-XD MENTION AUDIO SENDER
//
@joaopfsilva
joaopfsilva / iban.js
Created September 27, 2019 07:40
IBAN validator
// https://github.com/arhs/iban.js
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports);
} else {
// Browser globals
@Vertecedoc4545
Vertecedoc4545 / Hyprland-Ubuntu.md
Last active May 1, 2024 17:12
Ubuntu 23.04 Build and Install instructions for Hyprland

Building on Ubuntu 23.04

You have 2 options, use the script descrived bellow or follow the instrutions

script in this gist if you want the source code

wget https://gist.githubusercontent.com/Vertecedoc4545/6e54487f07a1888b656b656c0cdd9764/raw/2c5e8ccb428fc331307e2f653cab88174c051310/build-ubuntu-23.sh
chmod +x build-ubuntu-23.sh
./build-ubuntu-23.sh

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

@portiss
portiss / reverseString.js
Created February 5, 2024 09:14
Reverse a string
function reverseString(str) {
return str.split('').reverse().join('');
}
@portiss
portiss / isBalancedTree.js
Created February 5, 2024 09:12
isBalancedTree
function isBalancedTree(node) {
if (node) {
const keepSearch = h(node.right) - h(node.left) <= 1
if (keepSearch) {
return balancedTree(node.right) && balancedTree(node.left)
}
else return false
}
}
@portiss
portiss / flattenArrays.js
Created February 5, 2024 09:11
Implement JS flatMap
function flatten(ary, ret = []) {
return ary.reduce((ret, entry) => {
(Array.isArray(entry))? flatten(entry, ret) : ret.push(entry)
return ret
}, ret)
}
console.log(flatten([[[0], [1]], [[2], [3]], [[4], [5]]]))
@portiss
portiss / currying.js
Created February 5, 2024 09:09
Write the sum(3)(2)
function add(x) {
return (y) => x + y;
}
@portiss
portiss / fibonacci.js
Last active May 1, 2024 17:10
fibonacci (memoized)
const memo = {}
function fibonacci(n, memo){
if(n<2)
return n
if(!memo[n-1])
memo[n-1] = fibonacci(n-1, memo)
if(!memo[n-2])
memo[n-2] = fibonacci(n-2, memo)
return memo[n-1] + memo[n-2]
}
@portiss
portiss / isParenthesisMatching.js
Created February 6, 2024 09:42
Parenthesis Matching (Using stack)
const isParenthesisMatching = (str) => {
const stack = []
const open = {
'{': '}',
'[': ']',
'(': ')'
}
const closed = {