Skip to content

Instantly share code, notes, and snippets.

View damncabbage's full-sized avatar
🙅‍♀️
permanent omnishambles

Robin Howard damncabbage

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

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
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

Enums

Elm

Can be implemented using “Custom Types”

@damncabbage
damncabbage / sql.rb
Last active August 29, 2015 14:21 — forked from zerowidth/sql.md
# GitHub::SQL - a helping hand for SQL in a rails app.
#
# Built for MySQL, adaptations and updates welcome.
#
# Authors/maintainers: @jbarnette, @zerowidth, et. al.
#
# The MIT License (MIT)
#
# Copyright (c) 2014 GitHub, Inc.
#
@damncabbage
damncabbage / foo.rb
Last active August 29, 2015 14:19 — forked from radar/foo.rb
require 'rspec'
require 'rspec/autorun'
module Foo
end
RSpec.describe Foo do
it "tests" do
expect(subject.class).to eq(Foo)
end
func coalesceMaps(args ...map[string]interface{}) map[string]interface{} {
var m map[string]interface{}
if len(args) > 1 {
m = make(map[string]interface{})
for _, arg := range args {
m = clobberMerge(m, arg)
}
} else {
@damncabbage
damncabbage / Strictness.hs
Created March 2, 2015 11:30 — forked from tonymorris/Person.hs
Haskell Strictness
data Person = Person {
firstName :: String
, lastName :: String
}
data Person' = Person' {
firstName' :: !String
, lastName' :: String
}
@damncabbage
damncabbage / Main.hs
Last active August 29, 2015 14:03 — forked from christian-marie/gist:475858353961828655f8
Prisoner's Dilemma: Game Server
--
-- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--
module Main where
@damncabbage
damncabbage / deploy.rb
Last active December 20, 2015 17:49 — forked from pyrmont/deploy.rb
default_run_options[:pty] = true # Must be set for the password prompt from git to work
set :ssh_options, { :forward_agent => true }
set :user, "smash"
set :application, "SMASH! Join Us"
set :domain, "linode.smash.org.au"
set :deploy_to, "/var/www/smash.org.au/2014-staff-call"
set :shared_path, "#{deploy_to}/shared"
set :use_sudo, false
@damncabbage
damncabbage / gist:6077544
Last active December 20, 2015 05:19 — forked from mwotton/gist:6077238
<?php
header("Content-Disposition: binary/data");
preg_match('/([^\/]+)\/favicon.ico/', $_SERVER['REQUEST_URI'], $matches);
echo (file_exists(getenv('cachedir').'/'.$matches[1]) ? file_put_contents(getenv('cachedir').'/'.$matches[1], file_get_contents('http://'.$matches[1].'/favicon.ico')) : file_get_contents(getenv('cachedir').'/'.$matches[1]));
// see that. thats fucking magestic is what it is.