Skip to content

Instantly share code, notes, and snippets.


Jeff Lindsay progrium

View GitHub Profile
progrium /
Created May 28, 2020
zsh hook to automatically source/"unsource" directories with .devrc
autoload -U add-zsh-hook
load-devrc() {
if [[ -f .devrc && -r .devrc ]]; then
source .devrc
if typeset -f devrc-unset > /dev/null; then
unset -f devrc-unset
View gist:12a2941edb41a4610be80d7248ac0dc5
sudo softwareupdate --fetch-full-installer
/Applications/Install\ macOS\ High\ \
--eraseinstall --agreetolicense --nointeraction
View gist:edd0f8bac978d9fb37c470459e291f89
package main
import (
type MyInterface interface {
Foo() string
View NowPlayingStatus.js
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
var app = $.NSApplication.sharedApplication;
var statusBarItem = $.NSStatusBar.systemStatusBar.statusItemWithLength($.NSVariableStatusItemLength);
var track = Application('Spotify').currentTrack
name: "ProgramDelegate",
progrium / fbpost
Last active Aug 17, 2018
Facebook no longer allows news feed posts to be added programmatically via API. But we can still post them programmatically...
View fbpost
#!/usr/bin/env node
// Usage:
// Login manually, saving your authenticated session in "data":
// $ ./fbpost --login
// Now you can post whatever you want via argument:
// $ ./fbpost "Hello world, this is a post!"
(async() => {
const puppeteer = require('puppeteer');
progrium / example.js
Last active Jul 14, 2018
Example throw-away DSL for generating TypeScript
View example.js
var Generator = require("./tsgen")
ts = new Generator()
ts.decl("import", "electron", "from", ts.str("electron"))
ts.decl("import", "qrpc", "from", ts.str("qrpc"))
ts.commentBlock("Here is a function")
ts.func("register", [ts.var("api", "qrpc.API")], null, (ts) => {"api.handle", ts.str("echo"), ts.lambda(ts.var("r", "qrpc.Responder"), ts.var("c", "qrpc.Call"), null, (ts) => {"r.return", ts.inline("c.decode")))
View gist:8f6daad638b4fe06bc959d34eff2fa2d
Process: Descript [12470]
Path: /Applications/
Identifier: com.descript.Descript
Version: 1.4.2 (1806260931)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Descript [12470]
User ID: 501
Date/Time: 2018-06-28 19:42:29.774 -0500
View FollowSceneCamera.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class FollowSceneCamera : MonoBehaviour {
private Vector3 lastPosition;
private Quaternion lastRotation;
View gist:824849a0edd0beb206956d00da744f0f
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ElevatorDoors : MonoBehaviour {
public GameObject doorLeft;
public GameObject doorRight;
public float speed = 20f;
public GameObject elevator;
View gist:4a725372954cfa0ee39ae2aad502ae5f
// magical github automation
// add hooks similar to below based on:
// use github object according to docs:
const Promise = require("bluebird");