Skip to content

Instantly share code, notes, and snippets.

View WesleyAC's full-sized avatar
❤️

Wesley Aptekar-Cassels WesleyAC

❤️
View GitHub Profile
@WesleyAC
WesleyAC / build.sh
Last active April 30, 2024 16:32
Simple rust build and deploy script — https://blog.wesleyac.com/posts/simple-deploy-script
#!/usr/bin/env bash
cd $(dirname $0)
docker run --rm -it -v "$(pwd)":/home/rust/src -v cargo-git:/home/rust/.cargo/git -v cargo-registry:/home/rust/.cargo/registry -v "$(pwd)/target/":/home/rust/src/target ekidd/rust-musl-builder:nightly-2021-01-01 sudo chown -R rust:rust /home/rust/.cargo/git /home/rust/.cargo/registry /home/rust/src/target
docker run --rm -it -v "$(pwd)":/home/rust/src -v cargo-git:/home/rust/.cargo/git -v cargo-registry:/home/rust/.cargo/registry -v "$(pwd)/target/":/home/rust/src/target ekidd/rust-musl-builder:nightly-2021-01-01 cargo build --release
@WesleyAC
WesleyAC / readme.md
Last active November 26, 2023 13:49
a few adblock filters to hide all "recommended" youtube videos, while still allowing watching videos and looking at specific channels.

adblock filter to hide youtube recommendataions

this is an adblock filter to hide "recommended" videos on youtube in every place in the UI where they show up, while allowing you to watch videos and browse specific channels.

how to install

you can either copy-paste the three lines in the youtube_recommended_adblock.txt file, or you can click on the "Raw" button, and add that URL to your adblockers list of lists.

@WesleyAC
WesleyAC / cracklepop.bf
Created December 30, 2016 04:26
Cracklepop in brainfuck
[
CracklePop in brainfuck
Memory architecture:
00: "\n"
01: "p"
02: "o"
03: "P"
04: "e"
05: "l"
06: "k"
@WesleyAC
WesleyAC / asm.py
Created June 24, 2019 03:04
janky z80 assembler
#!/usr/bin/env python3
# vim: ts=11
# Copyright 2019 Google LLC
# SPDX-License-Identifier: Apache-2.0
#
# A SUPER JANK Z80 assembler, written to see if writing a assembler that parses
# the opcode table was reasonable.
# (see https://twitter.com/WAptekar/status/1142828240874221568)
#
@WesleyAC
WesleyAC / countbugs.py
Created March 10, 2019 17:24
quick & dirty node.js dependency analysis tools
#!/usr/bin/env python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
@WesleyAC
WesleyAC / feed.xml
Last active November 6, 2018 07:30
Daily Musings
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Wesley's Daily Musings</title>
<link href="https://gist.github.com/WesleyAC/cfac4e1011b3cc8a7362ddc148299775"/>
<link rel="self" href="https://gist.github.com/WesleyAC/cfac4e1011b3cc8a7362ddc148299775/raw/feed.xml"/>
<updated>2017-11-20T17:56:45Z</updated>
<author>
<name>Wesley Aptekar-Cassles</name>
</author>
<id>https://gist.github.com/WesleyAC/cfac4e1011b3cc8a7362ddc148299775</id>
" <3 Vim
" This is my .vimrc
" I'm still working on it...
set nocompatible
" VUNDLE/PLUGINS
set rtp+=~/.vim/bundle/Vundle.vim
filetype off
@WesleyAC
WesleyAC / generate_trap_motion.py
Created January 2, 2017 05:38
A hacky script to generate a plot of a trapezoidal motion profile
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 1000)
pdot = np.piecewise(x, [x < 4, (x >= 4) & (x <= 6), x > 6], [lambda x: x/2, 2, lambda x: -x/2 + 5])
p = []
psum = 0
for v in pdot:
p.append(psum)
@WesleyAC
WesleyAC / worldphysics.lua
Created December 13, 2013 16:28
WorldPhysics, my new, hacked together, feature creeped library for love!
world = {
physics = {
new = function(objtype, d, i, w, h, ubody, ushape)
if world.physics[objtype] == nil then world.physics[objtype] = {all = {}} end
world.physics[objtype].all[#world.physics[objtype].all+1] = {}
world.physics[objtype].all[#world.physics[objtype].all].body = ubody
world.physics[objtype].all[#world.physics[objtype].all].shape = ushape
world.physics[objtype].all[#world.physics[objtype].all].fixture = love.physics.newFixture(world.physics[objtype].all[#world.physics[objtype].all].body, world.physics[objtype].all[#world.physics[objtype].all].shape, d)
world.physics[objtype].all[#world.physics[objtype].all].image = i
world.physics[objtype].all[#world.physics[objtype].all].width = w
@WesleyAC
WesleyAC / build.log
Created November 11, 2013 21:49
Output of `/home/wesley/.cpanm/work/1384206407.5965/build.log` on Arch linux.
cpanm (App::cpanminus) 1.7001 on perl 5.018000 built for i686-linux-thread-multi
Work directory is /home/wesley/.cpanm/work/1384206407.5965
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar: tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.