Skip to content

Instantly share code, notes, and snippets.

View araguaci's full-sized avatar
🌎
coffeeing, praying & coding... 🧭✨

araguaci

🌎
coffeeing, praying & coding... 🧭✨
View GitHub Profile
@araguaci
araguaci / Low Poly Art Generator
Last active April 30, 2024 05:12
Low Poly Art Generator
<!--
https://github.com/evansque/polygonize
-->
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<header id="header">
<div class="cell-size-value-wrapper">
<span>Cell size:</span>
<span id="cell-size-value">30</span>
atl*CLI> core show help
! -- Execute a shell command
acl show -- Show a named ACL or list all named ACLs
ael reload -- Reload AEL configuration
ael set debug {read|tokens|macros|contexts|off} -- Enable AEL debugging flags
agi dump html -- Dumps a list of AGI commands in HTML format
agi exec -- Add AGI command to a channel in Async AGI
agi set debug [on|off] -- Enable/Disable AGI debugging
agi show commands [topic] -- List AGI commands or specific help
aoc set debug -- enable cli debugging of AOC messages
@Athou
Athou / docker-wsl2-setup.sh
Last active November 21, 2024 10:01
install docker in Debian 11/WSL2 without Docker Desktop
# install docker in Debian 11/WSL2
# uses systemd-genie since docker requires systemd but it's not available for WSL
# this is an alternative to Docker Desktop
# prerequisites
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ca-certificates curl wget gnupg lsb-release apt-transport-https
# systemd-genie requires dotnet runtime, add Microsoft repo
const _ = require('lodash')
const actionTree = generateActionTree()
const steps = resolveDependencies(actionTree)
console.log(steps)
function resolveDependencies(cmds) {
const dependencies = fetchDependencies(actionTree)
const steps = chunkIntoSteps(dependencies)
return steps
@lancejpollard
lancejpollard / findPrime.js
Created January 12, 2022 15:35
AKS + Miller Prime Test Combination in JavaScript
// function binomialCoeff(n, k) {
// if ((k === 0) || (k === n)) {
// return 1n
// } else {
// return binomialCoeff(n - 1n, k - 1n) + binomialCoeff(n - 1n, k)
// }
// }
// function isDivisible(value) {
@adrianhajdin
adrianhajdin / finished.js
Created July 9, 2021 08:21
Amazon Scraper API
const express = require('express');
const request = require('request-promise');
const PORT = process.env.PORT || 5000;
const app = express();
app.use(express.json());
const returnScraperApiUrl = (apiKey) => `http://api.scraperapi.com?api_key=${apiKey}&autoparse=true`;
import { createContext, ReactNode, useEffect, useState } from 'react'
type Theme = 'light' | 'dark';
type ThemeContextProviderProps = {
children: ReactNode;
}
type ThemeContextType = {
theme: Theme;
@eizedev
eizedev / treestyletab.css
Created June 11, 2021 10:20
Firefox Tree Style Tab CSS - Collapsible
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar.
#tabbar {
border: 0;
overflow-y: scroll !important;
margin-left: -18px !important;
}
*/
/* Hide .twisty and adjust margins so favicons have 7px on left. */
.tab .twisty {
@ld100
ld100 / ArchLinuxWSL2.md
Last active November 23, 2024 10:10
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@sebastianfdez
sebastianfdez / BTree.js
Last active May 18, 2024 06:33
FINAL COMPLETE BTREE CLASS
export class BTreeNode {
constructor(isLeaf) {
/**
* @type {number[]} list of values in the node
*/
this.values = [];
/**
* @type {boolean} is a leaf
*/
this.leaf = isLeaf;