Skip to content

Instantly share code, notes, and snippets.

View oogali's full-sized avatar

Omachonu Ogali oogali

  • Ordinary Stack
  • Princeton, NJ
  • 19:43 (UTC -04:00)
View GitHub Profile
@oogali
oogali / hacky-capture.ts
Last active December 8, 2022 12:58
Hacky, unstable capture canvas of Bldrs Share
import { chromium } from 'playwright'
export default class Capture {
async capture(url: string, filename: string, width: number = 1280, height: number = 720): Promise<void> {
const browser = await chromium.launch()
const context = await browser.newContext({
viewport: {
width: width,
height: height,
},
@oogali
oogali / audit-count.md
Created November 10, 2022 12:38
Audit Count per Distinct Auditor from Mozilla Included CA Certificate List
Auditor Count
AENOR INTERNACIONAL, S.A. (Unipersonal) 6
Anthony Kam & Associates Ltd. 2
Auren 4
BDO International Limited 45
BDO Malaysia 4
BSI 2
Bureau Veritas Italia S.p.A 1
CSQA Certificazioni srl 6
@oogali
oogali / discoparty.go
Created October 17, 2022 21:31
discord bot hello world
package main
import (
"os"
"os/signal"
"github.com/bwmarrin/discordgo"
"github.com/rs/zerolog/log"
)
@oogali
oogali / install-and-run-invokeai.sh
Last active October 31, 2022 18:16
InvokeAI ...without Anaconda on a MacBook Pro M1
# Make sure you have Homebrew installed
brew install cmake protobuf python3 rust
git clone https://github.com/invoke-ai/InvokeAI.git
# Sign up for an account at huggingface.co
# Download checkpoint file from https://huggingface.co/CompVis/stable-diffusion-v-1-4-original
cd InvokeAI/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-mac-MPS-CPU.txt
mkdir -p models/ldm/stable-diffusion-v1/
@oogali
oogali / build.sh
Last active September 2, 2022 14:00
Build IfcOpenShell on MacOS M1 (arm64)
brew install boost swig cmake ftgl cgal gmp libaec ninja opencascade hdf5 python3 zlib
git clone git@github.com:IfcOpenShell/IfcOpenShell.git
cd IfcOpenShell/
git submodule init
git submodule update --recursive
mkdir build
cd build/
@oogali
oogali / install.sh
Created January 23, 2022 17:47
Install AWS CLI Endpoint Plugin (Debian Linux)
#!/bin/sh
set -e
pip install --no-deps awscli-plugin-endpoint
legacy_plugin_path=$(pip show awscli-plugin-endpoint | awk '/^Location:/ { print $2 }')
cat <<EOF>> ${HOME}/.aws/config
[plugins]
cli_legacy_plugin_path=${legacy_plugin_path}
@oogali
oogali / swap-interface.sh
Created August 16, 2020 14:00
Swap a physical interface with a bridge (KVM prep, CentOS 8)
#!/bin/sh
#
## Interface-to-bridge swapper
## @oogali
#
# I want to run KVM, but I don't want dnsmasq
# Because I want my VMs to have direct access to the LAN broadcast domain
# Therefore I need a bridge interface
# But I don't have one already, so I must create one
# But I don't want to reboot nor do I want to create text files by hand
@oogali
oogali / uninstall-node.sh
Created August 1, 2020 21:39
Uninstall Node on MacOS (if installed with official MacOS installer)
#!/bin/sh
sudo rm -rf /usr/local/bin/node \
/usr/local/bin/npm \
/usr/local/include/node \
/usr/local/lib/node_modules \
/usr/local/share/doc/node/gdbinit \
/usr/local/share/doc/node/lldb_commands.py \
/usr/local/share/man/man1/node.1 \
/usr/local/share/man/man[15]/npm* \
@oogali
oogali / server_test.go
Created May 15, 2020 13:14
Failing unit test when max message bytes is exceeded
package inboundfun
import (
"bufio"
"io"
"net"
"testing"
"github.com/emersion/go-smtp"
"github.com/stretchr/testify/assert"
@oogali
oogali / .dockerignore
Created September 21, 2019 17:14
My go-to .ignore files
.idea
Dockerfile
docker-compose.yml
script/