Skip to content

Instantly share code, notes, and snippets.

View influx6's full-sized avatar
🎯
Focusing

Ewetumo Alexander influx6

🎯
Focusing
View GitHub Profile
# Unix (Terminal)
open -a "Google Chrome" --args --disable-gpu-vsync --disable-frame-rate-limit
# Windows (Command prompt)
start chrome --args --disable-gpu-vsync --disable-frame-rate-limit
@influx6
influx6 / ContentView.swift
Created August 23, 2023 23:07 — forked from alexwidua/ContentView.swift
SwiftUI Grid Animation
import SwiftUI
// 1. Use looped H/VStacks to create a grid
// 2. Conditionally increase spacing to grow/shrink the grid
// 3. Calculate the distance of each dot to the center and use the value to stagger the animation
//4. Add random delay on top of the staggered delay value
struct ContentView: View {
// const & state
@influx6
influx6 / setup.md
Last active July 3, 2023 12:16 — forked from akella/setup.md
WEBGL Tools Setuo
@influx6
influx6 / write-an-open-source-js-lib.md
Created April 22, 2023 16:15 — forked from oncode/write-an-open-source-js-lib.md
How to Write an Open Source JavaScript Library
////////////////////////////////////////////////////////////////////////////////
// Create a directory called "pages" next to
// this file, put markdown files in there, and
// then run:
//
// ```
// $ node build.mjs
// ```
//
// Then deploy the "build" directory somewhere.
@influx6
influx6 / min-char-rnn.py
Created January 10, 2023 15:02 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@influx6
influx6 / flush-iptables.sh
Created December 31, 2022 08:34 — forked from mrclay/flush-iptables.sh
Flush IP tables and restart docker
#!/bin/bash
# Script is needed because my default firewall rules are messed up and after
# every restart, docker containers can't make connections to the host, notably
# preventing debuggers like xdebug from attaching.
# If networking fails in your containers but works in others, rm and re-create the
# docker network that container is bound to.
set -euo pipefail
@influx6
influx6 / mongodb-ssl.sh
Created November 24, 2022 18:35 — forked from kevinadi/mongodb-ssl.sh
Script to create self-signed CA certificates, server certificates, and client certificates for testing MongoDB with SSL
#!/bin/sh
# Generate self signed root CA cert
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com"
# Generate server cert to be signed
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com"
# Sign the server cert
@influx6
influx6 / headers.py
Created October 9, 2022 07:54 — forked from Philogy/headers.py
Transmission11s Style Headers In Python
#!/bin/python3
import sys
import pyperclip
def main():
args = sys.argv
if len(args) != 2:
raise ValueError(f'Invalid argument count {len(args)} expected 2')
word = args[1]
@influx6
influx6 / dom-libraries.md
Created September 11, 2022 09:20 — forked from WebReflection/dom-libraries.md
A recap of my FE / DOM related libraries

My FE/DOM Libraries

a gist to recap the current status, also available as library picker!

Minimalistic Libraries

do one thing only and do it well

  • µhtml (HTML/SVG auto-keyed and manual keyed render)
  • augmentor (hooks for anything)
  • wickedElements (custom elements without custom elements ... wait, what?)