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
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 sql.rb
# 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.
#
View foo.rb
require 'rspec'
require 'rspec/autorun'
module Foo
end
RSpec.describe Foo do
it "tests" do
expect(subject.class).to eq(Foo)
end
View gist:5cb14bef6110e2c3a6a6
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 Mar 2, 2015 — forked from tonymorris/Person.hs
Haskell Strictness
View Strictness.hs
data Person = Person {
firstName :: String
, lastName :: String
}
data Person' = Person' {
firstName' :: !String
, lastName' :: String
}
@damncabbage
damncabbage / Main.hs
Last active Aug 29, 2015 — forked from christian-marie/gist:475858353961828655f8
Prisoner's Dilemma: Game Server
View Main.hs
--
-- 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
View 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
View gist:6077544
<?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.