Skip to content

Instantly share code, notes, and snippets.

@jodal
jodal / upgrade-checklist.md
Last active September 18, 2020 09:36
Mopidy extension upgrade checklist

Mopidy extension upgrade checklist

Preparations

  • Check if on latest master
  • Create a branch: git checkout -b python3

Project setup

setup.cfg

@rcarmo
rcarmo / bt-agent.service
Last active December 12, 2023 13:14
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
# in /etc/systemd/system
[Unit]
Description=Bluetooth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target
@CoryBloyd
CoryBloyd / SDLblit.cpp
Last active March 27, 2024 22:34
Minimal code to set up a window in SDL and blit from CPU RAM to the window
// This work (SDLblit.cpp, by Cory Bloyd) is free of known copyright restrictions.
// https://creativecommons.org/publicdomain/zero/1.0/
#include <SDL.h>
inline uint32_t argb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) { return (a<<24) | (r << 16) | (g << 8) | (b << 0); }
int main(int argc, char *argv[]) {
SDL_Init(SDL_INIT_VIDEO);
SDL_Rect screenRect = { 0,0,1024,1024 };
@mshkrebtan
mshkrebtan / mpd-alarm.sh
Created April 1, 2018 11:13
MPD Alarm Clock
#!/bin/bash
# Volume to start with
mpc_volume=$1
# Fade-in time in seconds
fade_in_time=$2
# Alarm Clock playlist
playlist="$3"
function get_mpc_volume() {