Skip to content

Instantly share code, notes, and snippets.

permanent omnishambles

Rob Howard damncabbage

permanent omnishambles
Block or report user

Report or block damncabbage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
damncabbage / Gemfile
Created Nov 2, 2019
Voyager Image, Ruby port
View Gemfile
source ''
gem 'wavefile'
damncabbage / Cargo.toml
Last active Oct 28, 2019
Voyager Image, a crappy non-functional attempt. 😅
View Cargo.toml
name = "voyager_images"
version = "0.1.0"
authors = ["Rob Howard <>"]
edition = "2018"
# See more keys and their definitions at
hound = "3.4.0"
damncabbage / useUnmountCanary.js
Created Sep 16, 2019
A hook that provides a flag to be used in promises and other async functions that can be triggered and not yet resolved by the time a component unmounts.
View useUnmountCanary.js
// @flow
import { useEffect, useRef } from 'react';
// A hook that provides a flag to be used in promises and other async functions that
// can be triggered and not yet resolved by the time a component unmounts.
// For example:
// const isMounted = useUnmountCanary();
View chat - explaining_ruby_yield.markdown

Yields control back to the context that resumed the fiber ah yeah totally :thinking_very_much: ... anyone have an english explanation of ruby yield I never get it. Also yield_self and the difference please, thanks.

There's unfortunately a few things going on; there's regular Ruby yield keyword, there's yield_self method on everything, and there's the Fiber version of yield that has nothing to do with either (which basically nobody is going to need to know about, including me).

Which did you want to know about? 'Regular' yield?

Just in case this helps:

import sys
from time import sleep
import random
import cursor
class Renderer:
def __init__(self, width, height):

(This is a fork of Michael's original gist with some editing of the unions + records sections.)

Elm and Typescript: comparison of type checking features

Each of these examples assume the usage of --strict mode in Typescript



Can be implemented using “Custom Types”

View On Git's push --force-with-lease.markdown

PSA about Git in case folks haven't run into git push --force-with-lease before: it just saved my bacon (again).

I have a shared branch for a feature my team at work is working on, feature/flub [yes, okay, I've anonymised it]. We've been merging PRs into it.

To incorporate the build-fix changes above, I did this:

$ git checkout feature/flub                # I've been working on other stuff; let's hop over to the shared branch.
$ git pull --rebase origin master          # Take the branch, and pretend we *just* created it off the latest 'master' on GitHub.
$ git push --force-with-lease origin HEAD  # Tell GitHub about the new change.
damncabbage /
Last active Feb 25, 2019
Google Calendar Crappy Day Planner, Calendar Import Script
function importCalendar(){
// Settings, because who needs function arguments?
// --------------
var calendarName = '';
var day = new Date();
var firstHour = 8;
var lastHour = 18;
var canonicalStartRow = 2;
var canonicalColumn = 2;
var templateSheetName = 'Template';
View .htaccess
RewriteEngine on
# Manual rewrites; see ###s below.
RewriteRule questions/ questions.php [NC,L]
RewriteRule questions questions.php [NC,L]
RewriteRule episodes/ episodes.html [NC,L]
RewriteRule episodes episodes.html [NC,L]
View CancerAid - Backend (Elixir+Ruby)

Backend (Elixir+Ruby) Developer at CancerAid

CancerAid is on a mission to help people who are undergoing cancer treatment understand their condition and take control of their journey. We're a funded startup focused on making people’s lives better. We’re looking for an backend developer to join our team and take the reins of our Elixir + Ruby apps and associated infrastructure, working primarily onsite at Chris O'Brien Lifehouse, near Newtown in Sydney.

The Company

CancerAid is a company founded by two radiation oncologists who were frustrated with the limitations of patient care tools available. They created CancerAid out of wanting to empower patient

You can’t perform that action at this time.