Skip to content

Instantly share code, notes, and snippets.

@jacobdepriest
jacobdepriest / codespaces-and-jekyll.md
Last active April 16, 2024 08:30
Using GitHub Codespaces to edit a Jekyll Static Site

Using GitHub Codespaces is my new default for editing a static Jekyll site

  1. Navigate to a repo where you have your Jekyll static site (maybe your GitHub pages site)
  2. Launch Codespaces (Code button -> Cloud -> New codespace on current branch)
  3. Once it's launched, run the following in the terminal
gem install bundler jekyll
bundle update
bundle exec jekyll serve
@justinschuldt
justinschuldt / raspberry-pi-zero_as_webcam.md
Last active February 25, 2024 07:34
Directions for setting up a RaspberryPi to act as a generic USB webcam

hardware/software

Webcam parts:

  • Raspberry Pi Zero W Rev 1.1
  • Raspberry Pi Camera v2 (8-megapixel)
  • Raspberry Pi High Quality Camera (12.3-megapixel)
  • Raspbian Buster Lite 2020-02-13

Webcam works with:

  • Windows 10
  • Windows 10 "Camera" app
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@gmolveau
gmolveau / fathom_to_heroku.md
Last active July 11, 2020 18:06
How to push Fathom analytics - https://github.com/usefathom/fathom to Heroku

Deploy Fathom on Heroku

Requirements

  • heroku cli (logged in)
  • git
  • curl
  • wget
  • tar are required
  • ~ openssl is required to generate the secret_key, but you're free to use what you want
@willu47
willu47 / distingify.py
Created March 13, 2018 11:37
Converts the AKWF single-wave sample pack into the format required for the Expert Sleepers Disting Mk4
"""
Navigate to the root of the AKWF folder downloadable from http://www.adventurekid.se/AKRTfiles/AKWF/AKWF.zip
and run this script using the command ``python3 distingify.py``
"""
import os
def main():
folder_list = []
for folder in os.listdir():
if os.path.isdir(folder):
/* (Not so) simple synth based on Mozzi library and a bunch of pots.
*
* This code is derived from the public domain example of an 8 potentiometer
* synth from e-licktronic (https://www.youtube.com/watch?v=wH-xWqpa9P8).
*
* Severely edited for clarity and configurability, adjusted to run with modern
* versions of Mozzi, extended for polyphony by Thomas Friedrichsmeier. Also,
* this sketch will auto-generate fake MIDI events and random parameters, so
* you can start listening without connecting anything other than your
* headphones or amplifier. (Remove the FAKE_POTS and FAKE_MIDI defines, once
@nepsilon
nepsilon / git-change-commit-messages.md
Last active April 24, 2024 06:30
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@ttscoff
ttscoff / dontforget.bash
Last active November 8, 2023 06:42
Quick reminders from Terminal (bash)
#!/bin/bash
# dontforget
#
# A stupid script for short term reminders in bash
#
# Arguments just need to contain a number and a bunch of words.
#
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
#
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: