Skip to content

Instantly share code, notes, and snippets.

# A rewrite of an originally terrible solution to the interview challenge
# in the 2020-08-31 issue of @cassidoo's newsletter:
# https://buttondown.email/cassidoo/archive/9bbcae4c-b24e-4d91-9332-115a9c286041
prices = [110, 1, 999, 180, 260, 40, 310, 535, 695, 1, 999, 1]
highest = 0
buy_day = 0
int main(int argc, char** argv) {
int a;
int b;
a = b = 1;
a == b;
return 0;
}
@gavinanderegg
gavinanderegg / index.html
Created October 25, 2017 14:34
Colour Overlays
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
#background {
@gavinanderegg
gavinanderegg / gulpfile.js
Last active September 27, 2016 13:42
Gulp demo setup
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
livereload = require('gulp-livereload'),
sourcemaps = require('gulp-sourcemaps'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify');
[~/Downloads]⚡ unzip MSEdge.Win10TH2.VirtualBox.zip
Archive: MSEdge.Win10TH2.VirtualBox.zip
warning [MSEdge.Win10TH2.VirtualBox.zip]: 558164870 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [MSEdge.Win10TH2.VirtualBox.zip]: start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
# If you haven't done this already since upgrading, you need to:
xcode-select --install
# then build mcrypt with brew:
brew install php55-mcrypt
# If you don't have a php.ini already then copy the default over:
iPad
iPad 2
iPad (3rd generation)
iPad (4th generation)
iPad mini
iPad mini with Retina Display (which is now called iPad mini 2)
iPad Air
iPad Air 2
iPad mini 3
[...]⚡ brew install freetype
Warning: You have not agreed to the Xcode license.
Builds will fail! Agree to the license by opening Xcode.app or running:
xcodebuild -license
// !!! BINARY PROPERTY LIST WARNING !!!
//
// The pretty-printed property list below has been created
// from a binary version on disk and should not be saved as
// the ASCII format is a subset of the binary representation!
//
@gavinanderegg
gavinanderegg / gist:9338617
Last active August 29, 2015 13:56
Find the next first Tuesday of the month
<!doctype html>
<html>
<head>
<title>Next first Tuesday of the month</title>
</head>
<body>
<div id="nextMeetupTime"></div>
<script>