Skip to content

Instantly share code, notes, and snippets.

View mason-stewart's full-sized avatar
🎃
無敵

Mason Stewart mason-stewart

🎃
無敵
  • Bookshop.org
  • NeW eNgLaNd
View GitHub Profile
@ceschmidt
ceschmidt / gist:4519682
Created January 12, 2013 18:11
Cody Schmidt's homework #1 for CoderDojo-Greenville Web class Jan 2013.
<style type="text/css">
21.food {
background: rgb(59, 225, 10);
width: 200px;
height: 200px;
margin: 50px auto;
border-radius: 100px 26px;
}
@robotlolita
robotlolita / loops-are-evil.md
Last active March 2, 2022 17:19
Why `xs.each(f)` should not be considered a "loop".

First and foremost, let's take a look at the following pieces of code. The first one is something you should be rather familiar with, and the second one is also a somewhat familiar idiom these days (at least in languages with higher-order functions):

// Example 1:
30 + 12

// Example 2:
xs.map(f)
@switzersc
switzersc / problem_four.rb
Created December 9, 2013 20:23
project euler problems 1-4
# 4. A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
# Find the largest palindrome made from the product of two 3-digit numbers.
array = []
(100..999).each do |i|
(100...999).each do |y|
product = i * y
array << product if palindrome?(product)
end
end
@chriskjaer
chriskjaer / gulpfile.js
Last active November 1, 2017 08:22
Gulp recipe: Jade, Sass, Livereload and static server
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
csso = require('gulp-csso'),
uglify = require('gulp-uglify'),
jade = require('gulp-jade'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
tinylr = require('tiny-lr'),
express = require('express'),
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@avescodes
avescodes / core.clj
Last active May 9, 2016 07:58
Minimal Pedestal service without default interceptors or dev tooling machinery. Automatically reloads changes.
(ns my-todo.core
(:require [io.pedestal.http :as http]
[io.pedestal.http.route :refer [router]]
[io.pedestal.http.route.definition :refer [defroutes]]))
(defn hello-world [context]
{:status 200
:body "Hello, world!"
:headers {}})
@sheerun
sheerun / certgen.rb
Last active April 10, 2022 15:39
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@staltz
staltz / introrx.md
Last active June 2, 2024 11:03
The introduction to Reactive Programming you've been missing
anonymous
anonymous / config.json
Created November 15, 2014 14:17
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
Thank you for extending an invitation to speak at HighLoad++. I
sincerely appreciate your consideration.
I am an outspoken advocate for LGBTQ equality; this position is deeply
woven into my work. Clojure From The Ground Up is adamantly
LGBT-inclusive. Jepsen is named after a gay pop anthem and includes
dozens of references to same-sex relationships and trans identities. My
talk slides are populated with bearded nuns, genderqueer punks, and
trans hackers. My twitter feed is about as gay as it is possible to get.