Skip to content

Instantly share code, notes, and snippets.

Avatar
🙅‍♀️
permanent omnishambles

Rob Howard damncabbage

🙅‍♀️
permanent omnishambles
View GitHub Profile
@damncabbage
damncabbage / README.md
Last active Sep 15, 2020 — forked from BinaryMuse/README.md
Change your profile photo for all meetup groups
View README.md

I haven't found a way to set your main profile photo on meetup.com such that it overrides any old photos you have set in individual groups. This script will do just that — set your group specific profile photo to your main photo for every group you're in.

Here's what to do:

  1. Go to your main profile page: http://www.meetup.com/profile/
  2. Ensure you've set your main profile photo to the photo you want to use in all your groups.
  3. Open your browser's developer tools (often F12 on Windows, cmd+opt+i on macOS), copy the following code, paste it in the Console tab, and press enter:
var memberId = 56746842; // <=== Edit this
@damncabbage
damncabbage / Gemfile
Created Nov 2, 2019
Voyager Image, Ruby port
View Gemfile
source 'https://rubygems.org'
gem 'wavefile'
@damncabbage
damncabbage / Cargo.toml
Last active Oct 28, 2019
Voyager Image, a crappy non-functional attempt. 😅
View Cargo.toml
[package]
name = "voyager_images"
version = "0.1.0"
authors = ["Rob Howard <rob@robhoward.id.au>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
hound = "3.4.0"
@damncabbage
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:

View punch_tape_animation.py
import sys
from time import sleep
import random
import cursor
class Renderer:
def __init__(self, width, height):
View elm-typescript-types-comparison.md

(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

Enums

Elm

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.
To github.com:myorg/thing.git
@damncabbage
damncabbage / Code.gs
Last active Feb 25, 2019
Google Calendar Crappy Day Planner, Calendar Import Script
View Code.gs
function importCalendar(){
// Settings, because who needs function arguments?
// --------------
var calendarName = 'my.name@companydomain.com';
var day = new Date();
var firstHour = 8;
var lastHour = 18;
var canonicalStartRow = 2;
var canonicalColumn = 2;
var templateSheetName = 'Template';
You can’t perform that action at this time.