Skip to content

Instantly share code, notes, and snippets.

View olilarkin's full-sized avatar
πŸ’­
10x thanks to ChatGPT

Oli Larkin olilarkin

πŸ’­
10x thanks to ChatGPT
View GitHub Profile
@oshliaer
oshliaer / .en.md
Last active September 30, 2020 02:33
Create a Gmail draft with attachments via Google Apps Script #gas #gmail
@glen-cheney
glen-cheney / encoding-video.md
Last active November 24, 2024 10:09
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@notwa
notwa / halfband.c
Last active April 16, 2024 14:27
polyphase halfband filter generator
// C port of http://ldesoras.free.fr/prod.html#src_hiir
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <errno.h>
const double PI = 3.1415926535897932384626433832795;
void
compute_transition_param(double *kp, double *qp, double transition)
@shauvik
shauvik / OpenAtomHere
Created June 12, 2014 18:06
AppleScript to open current Finder directory in Atom editor
(*
* Finder Open Atom Here - v1.0 - 6/12/2014
* http://shauvik.com/
*
* Copyright (c) 2014 Shauvik Roy Choudhary
* Dual licensed under the MIT and GPL licenses.
* Based on Open iTerm Here script by Ben Alman
*)
tell application "Finder"
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active March 25, 2025 18:03
BBEdit-TextWrangler Regular Expression Cheat-Sheet
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@sftrabbit
sftrabbit / beta_distribution.hpp
Last active July 24, 2024 10:22
A beta distribution random number distribution for C++11. Conforms to the requirements for a random number distribution (Β§26.5.1.6 [rand.req.dist]) and is therefore compatible with the <random> C++ library header. Implemented in terms of two gamma distributions (std::gamma_distribution): if X and Y are independently distributed Ξ“(Ξ±, ΞΈ) and Ξ“(Ξ², …
#include <iostream>
#include <sstream>
#include <string>
#include <random>
namespace sftrabbit {
template <typename RealType = double>
class beta_distribution
{