Skip to content

Instantly share code, notes, and snippets.

View scalp42's full-sized avatar
πŸ‘¨β€πŸŽ¨

Anthony Scalisi scalp42

πŸ‘¨β€πŸŽ¨
View GitHub Profile
@tomholford
tomholford / install_pg_gem.md
Last active February 9, 2025 14:31
Install postgresql gem `pg` on macOS

Installing pg gem on macOS

If you're trying to install the postgresql gem pg and it is failing with the following error message:

Installing pg 1.2.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: ~/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/pg-1.2.3/ext
~/.rbenv/versions/3.0.0/bin/ruby -I ~/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -r ./siteconf20210125-97201-pycpo.rb extconf.rb
@gasman
gasman / encode.py
Created October 25, 2020 12:23
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
name,URL,supported platforms,GUI,CLI,supported hosts,add-on reconciliation,game detection,search,can install add-ons from URL,supports pre-releases,can install old versions of add-ons,supports ignoring and/or pinning add-ons,host swapping,can be configured to update add-ons without user input,can export and import list of installed add-ons,supports updating installed weakauras from wago.io,makes backups,self-updates,licence,user tracking,installed add-on database,configuration location,language,availability,approximate binary size,version as of writing
CurseBreaker,https://github.com/AcidWeb/CurseBreaker,all,no,TUI,"wowi, tukui, addons.wago (requires access token), github releases",optional,implicit; has to be placed in game folder,wago through their API,yes,curse and github only,no,pin,no,in headless mode,yes,yes,WTF folder on demand and every 24h,yes,gpl3,none,JSON file in WTF folder,WTF folder,Python,binaries,~10 mb,4.3.1
instawow,https://github.com/layday/instawow,all,yes (WebView),yes,"curse (requires ac
O1a_deploy_configure_architecture.
cluster.initial_master_nodes set 4 nodes then cluster start failed
cluster.initial_master_nodes commented out then cluster start failed
cluster.initial_master_nodes set node1 then start node2,node3 and node4 but failed
cluster.initial_master_nodes set node1 then start node3 and node4 but failed
cluster.initial_master_nodes set node1 then start node1 successfully
Node1:
[2020-03-14T21:00:25,636][INFO ][o.e.d.DiscoveryModule ] [node1] using discovery type [zen] and seed hosts providers [settings]
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@kquinsland
kquinsland / dummy0.netdev
Created December 3, 2019 02:54
How to get consul-agent and systemd.resolvd to co-exist peicefully and still be able to resolve *.consul hostsnames from within docker
# Creates a "dummy" network interface
# we'll configure this interface with a link-local address
# See: https://www.freedesktop.org/software/systemd/man/systemd.netdev.html
##
[NetDev]
Name=dummy0
Kind=dummy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:GetRole",
"iam:GetInstanceProfile",
@wmil
wmil / ivacy-ikev2-debian.md
Last active May 2, 2023 09:25
Ivacy IKEv2 on Debian

Ivacy IKEv2 on Debian

Install strongSwan

sudo apt-get -y update
sudo apt-get -y install strongswan strongswan-libcharon libcharon-extra-plugins

Download Trusted CA

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,