Skip to content

Instantly share code, notes, and snippets.

@theftprevention
theftprevention / remove-facebook-ads.js
Last active February 7, 2019 00:33
Periodically removes sponsored content from the Facebook news feed.
// ==UserScript==
// @name Remove Facebook Ads
// @version 1.0
// @description Removes sponsored content from the Facebook news feed.
// @author theftprevention
// @match https://www.facebook.com/
// @grant none
// ==/UserScript==
(function() {
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@gbaman
gbaman / HowToOTG.md
Last active October 3, 2025 07:37
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@staltz
staltz / introrx.md
Last active October 22, 2025 12:20
The introduction to Reactive Programming you've been missing