Skip to content

Instantly share code, notes, and snippets.

View influx6's full-sized avatar
🎯
Focusing

Ewetumo Alexander influx6

🎯
Focusing
View GitHub Profile
@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`/[email protected]"
# 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`/[email protected]"
# 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?)
@influx6
influx6 / jquery.qDefer.min.js
Created August 22, 2022 14:06 — forked from RonnyO/jquery.qDefer.min.js
Simply mimic the 'defer' attribute for inline scripts across all browsers (jQuery helper)
// http://bit.ly/qDefer
$(function(){$('script[type="text/javascript/defer"]').each(function(){$(this).clone().attr('type','').insertAfter(this)})});
@influx6
influx6 / libyjpagent_logfiles.txt
Created July 30, 2022 08:35 — forked from tjibbevanderlaan/libyjpagent_logfiles.txt
Log files of libyjpagent.so for YourKit profiler
#
# 12.0.6 ARMv5 sf
#
$ java -agentpath:/home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so
Error occurred during initialization of VM
Could not find agent library /home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so in absolute path, with error: /home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so: cannot open shared object file: No such file or directory
$ file /home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so
/home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped