Skip to content

Instantly share code, notes, and snippets.

Avatar
❤️

Wesley Aptekar-Cassels WesleyAC

❤️
View GitHub Profile
View build.sh
#!/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 Jun 8, 2020
a few adblock filters to hide all "recommended" youtube videos, while still allowing watching videos and looking at specific channels.
View readme.md

adblock filter to hide youtube recommendataions

this is an adblock fileter 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, in which case you will get updated rules should youtube break the current ones.

@WesleyAC
WesleyAC / asm.py
Created Jun 24, 2019
janky z80 assembler
View asm.py
#!/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 Mar 10, 2019
quick & dirty node.js dependency analysis tools
View countbugs.py
#!/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
#
View .vimrc
" <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 / feed.xml
Last active Nov 6, 2018
Daily Musings
View feed.xml
<?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>
@WesleyAC
WesleyAC / generate_trap_motion.py
Created Jan 2, 2017
A hacky script to generate a plot of a trapezoidal motion profile
View generate_trap_motion.py
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 / cracklepop.bf
Created Dec 30, 2016
Cracklepop in brainfuck
View cracklepop.bf
[
CracklePop in brainfuck
Memory architecture:
00: "\n"
01: "p"
02: "o"
03: "P"
04: "e"
05: "l"
06: "k"
View keybase.md

Keybase proof

I hereby claim:

  • I am wesleyac on github.
  • I am wesleyac (https://keybase.io/wesleyac) on keybase.
  • I have a public key whose fingerprint is 4F1A F97B 91DA C9DD F1F1 B0B9 4E9A A89C A3E0 93CE To claim this, I am signing this object:
{
    "body": {
        "client": {
@WesleyAC
WesleyAC / worldphysics.lua
Created Dec 13, 2013
WorldPhysics, my new, hacked together, feature creeped library for love!
View worldphysics.lua
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