Skip to content

Instantly share code, notes, and snippets.

@sixteenmillimeter
sixteenmillimeter / capture.sh
Last active January 12, 2024 04:09
Capture a livestream using youtube-dl and ffmpeg.
#!/bin/bash
#################################
# Instructions
#
# First, install ffmpeg and youtube-dl
#
# https://ffmpeg.org/download.html
# https://ytdl-org.github.io/youtube-dl/download.html
#
@sixteenmillimeter
sixteenmillimeter / emoji.sh
Created November 27, 2020 22:13
Install latest Apple emoji font set on Ubuntu
#!/bin/bash
wget https://github.com/samuelngs/apple-emoji-linux/releases/download/latest/AppleColorEmoji.ttf
mv AppleColorEmoji.ttf ~/.local/share/fonts
fc-cache -f -v
@sixteenmillimeter
sixteenmillimeter / ccapture_twitter.sh
Last active November 25, 2020 22:36
Bash script for rendering video from CCapture.js for Twitter
#!/bin/bash
# Requirements:
# ffmpeg
# identify
# mktemp
# tar
# Generate .tar of frames using https://github.com/spite/ccapture.js/
# Use the path of the .tar file as the first and only arguement in this script
@sixteenmillimeter
sixteenmillimeter / update.sh
Last active May 3, 2020 23:30
Update the intval3
cd ~/intval3
git reset --hard
git pull
npm i
sudo pm2 restart process.json --update-env
SPIRALROTATION=720;
SPIRALSTEPS=20;
INITIALRADIUS=20;
PITCH=6;
XMAXSHAPE=2;
module ShapeToExtrude ()
{
// Build in +x space. The outside edge of this shape must follow the extrusion path, or there will be open seams..
polygon ( points= [
@sixteenmillimeter
sixteenmillimeter / spirits_proof.js
Created October 14, 2019 15:58
Spirits midi proof of concept
const { ipcRenderer } = require('electron');
const { basename } = require('path');
var opts = {
lines: 13, // The number of lines to draw
length: 38, // The length of each line
width: 17, // The line thickness
radius: 45, // The radius of the inner circle
scale: 1, // Scales overall size of the spinner
corners: 1, // Corner roundness (0..1)
const int PIN_MOTOR_FORWARD = 9;
const int PIN_MOTOR_BACKWARD = 10;
void setup () {
pinMode(PIN_MOTOR_FORWARD, OUTPUT);
pinMode(PIN_MOTOR_BACKWARD, OUTPUT);
}
void loop () {
analogWrite(PIN_MOTOR_FORWARD, 125);
<html>
<head>
</head>
<body>
<script>
var sms = function (str) {
window.location.href = 'sms:?body=' + str;
};
sms('Product Title \n http://academy.com \n Custom Message');