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 / UbuntuSwapCtrlCmdKeys.md
Created July 28, 2024 12:00 — forked from kurozael/UbuntuSwapCtrlCmdKeys.md
How to swap the Ctrl and Cmd keys when using Ubuntu.
@influx6
influx6 / pbpaste-pbcopy-ubuntu.md
Created July 28, 2024 09:54 — forked from diegopacheco/pbpaste-pbcopy-ubuntu.md
pbpaste && pbcopy for Ubuntu Linux 20.04

Install

sudo apt-get install xclip -y

Create Alias

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

Try out

# 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