Skip to content

Instantly share code, notes, and snippets.

#Requires -version 2.0
<#
.SYNOPSIS
Copies files to a USB drive whenever one is plugged in.
.DESCRIPTION
Waits for a USB drivwe to be pugged in and then immediately copies the
contents of ./payload/ to the root of it. Primarily intended for batch
programming of microcontrollers that emulate a USB drive to which you
copy a .uf2 file, but there's no check, you can copy whatever you want
--[[Takes a table of subtables. the structure is
cardList[i].CardID = the cardID of the card
cardList[i].card = the JSON string for the card
]]
function deckFromList(cardList)
jsonString =[[{
"Name": "Deck",
"Transform": {
"posX": 0,
"posY": 0,
@DieKatzchen
DieKatzchen / pr.md
Created January 22, 2017 14:58 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@DieKatzchen
DieKatzchen / reader
Created September 15, 2015 00:55
TT-RSS rc.d script for FreeBSD.
#!/bin/sh
#
# PROVIDE: reader
# REQUIRE: php-fpm postgresql
#
# This rc.d script will autostart TT-RSS, it can be started, stopped,
# and restarted with the usual commands.
#
# Add the following to /etc/rc.conf[.local] to enable this service