This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <stdint.h> | |
/** | |
* msecs | |
*/ | |
typedef uint32_t when_t; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{process::Output, time}; | |
use timebase::{Event, Frame}; | |
use tinyaudio::prelude::*; | |
mod timebase; | |
#[derive(Copy, Clone)] | |
struct Note { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{process::Output, time}; | |
use timebase::{Event, Frame}; | |
use tinyaudio::prelude::*; | |
mod timebase; | |
const MSEC: i32 = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use fastrand; | |
#[derive(Debug, Copy, Clone)] | |
pub enum TimebaseMode { | |
OneShot, | |
Repeat | |
} | |
#[derive(Debug, Copy, Clone)] | |
pub struct Timebase { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DISPLAY= socat TCP-LISTEN:1337,crlf,fork exec:"mplayer -vo caca -quiet /home/lmarshall/Downloads/Rick_Astley_-_Never_Gonna_Give_You_Up_dQw4w9WgXcQ.mp4",pty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class T> | |
struct PolyBox { | |
typedef std::unique_ptr<T> Ptr; | |
/* Regular constructor */ | |
PolyBox(Ptr&& p): ptr(std::move(p)) {} | |
/* Copy */ | |
PolyBox(const PolyBox& t) : ptr(Ptr(t.ptr->clone())) {} | |
PolyBox& operator=(const PolyBox& t) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ingest(s): | |
counts = {} | |
for c in s: | |
if not c in counts: | |
counts[c] = 0 | |
counts[c] += 1 | |
return counts | |
import math |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOCK_LINK=/tmp/ssh_auth_sock_link | |
start_ssh_agent() { | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 | |
ln -vsnf $SSH_AUTH_SOCK $SOCK_LINK | |
} | |
if [[ $- == *i* ]] && ! [[ -e $SOCK_LINK ]]; then | |
# Agent socket link doesn't exist - assume agent isn't running | |
start_ssh_agent | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
months = [ | |
("January", 3), | |
("February", 0), | |
("March", 3), | |
("April", 2), | |
("May", 3), | |
("June", 2), | |
("July", 3), | |
("August", 3), | |
("September", 2), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'VGA Driver by Lee Marshall | |
CON | |
_clkmode = XINPUT + PLL16X | |
_xinfreq = 4_000_000 | |
VAR | |
long bitmapbase[1536] | |
byte cog | |
NewerOlder