Skip to content

Instantly share code, notes, and snippets.

View Trevoke's full-sized avatar
🎹
insert meme here.

Trevoke Trevoke

🎹
insert meme here.
View GitHub Profile

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@sleepyfox
sleepyfox / foxs-laws-of-software-development.md
Last active August 2, 2023 16:50
Fox's Laws of Software Development
author: @sleepyfox
title: Fox's laws of software development
date: 27 October 2021
preamble: A not entirely serious treatise on the immutable fundamental laws of software development activities

Fox's laws of software development

A not entirely serious treatise

@KevinGoodsell
KevinGoodsell / terminals.txt
Created December 17, 2010 00:32
The Trouble With Terminals
The Trouble With Terminals
Thu, 16 Dec 2010 16:43:20 -0800
Copyright 2010 Kevin Goodsell
0. License
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a
@netmute
netmute / README.md
Last active October 27, 2022 13:22
Game of Life

Game of Life

An implementation of Conway's Game of Life in 140 characters of Ruby.

Author

Created by Simon Ernst (@sier).

@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

# In case anyone is wondering how to easily use the :crypto hash or hmac API's from elixir-land, here you go.
File.stream!(filename, [:read, {:read_ahead, 65535}], 65535)
|> Enum.reduce(:crypto.hash_init(:sha), &:crypto.hash_update(&2, &1))
|> :crypto.hash_final
|> Base.encode16
# Line 3 opens up a stream, and we're reading in 64KB chunks from the FS which is roughly pretty efficient
# In line 4, we initialize our hash (which returns a context) and put that as the default value in the reducer
# The hash_update in the reducer returns the modified context. Remember arg1 is the item, and arg2 is the accumulator
···································································································
·PORT IVY SURFACE MAP··············································································
···································································································
···································································································
······································································A·allyway····················
······································································B·beach······················
··············B-B-T-B-B-B·············································C·lighthouse·················
·············/···/·······\············································D·docks······················
············B·Z-E-Q-R·····B-B·········································E·Main St····················
·············\··|············\········································F·bank·······················
@emad-elsaid
emad-elsaid / worm.rb
Created March 19, 2014 12:15
Worm game in under 50 line of code in ruby
#!/usr/bin/env ruby
require 'gosu' # gem install gosu --no-document
include Gosu
$dimension, $splits = 200, 20
$size = $dimension.to_f / $splits.to_f
class Worm
attr_writer :dir
def initialize() reset end
@laser
laser / movie.md
Last active November 18, 2020 19:02

Movie Ticket Kata

First, head here to join our Zoom meeting. It will help me following along while you work through the assignment.

What Are We Building?

Write a program that calculates purchase price for movie tickets using any language you like. It should not be a full-blown web app; it can be a simple class or collection of methods invokable by your test suite. We'll provide you with some requirements, test-cases, and even a sample interface - all you have to do is give us some software.

Base Admission Rate

@jonathanpberger
jonathanpberger / gist:313e2126dffa2d13f66d2d049bfbf944
Created June 21, 2016 20:34
An agile designer should be able to...

An agile designer should be able to articulate goals and risks and users, frame hypotheses, estimate stories, prioritize work, draft a product roadmap, derive MVPs, run a standup meeting, participate in Design Crit, onboard a new teammate, talk to stakeholders, whiteboard a userflow, win an argument, lose an argument, cut scope, write copy, facilitate a meeting, ask good questions, Get Out Of The Building, take orders, give orders, cooperate, act alone, analyze a new problem, lead a sketching session, let go of an idea (even when it's yours), parse analytics, design experiments, distinguish a bug from a chore, conduct a usability test, tell hard truths in a retro, accept hard truths in a retro, design for delight, write CSS, debug Javascript, commit to Git, pair program, test-drive a feature story, model a domain, craft a brand identity, design a visual system, earn trust, give trust, fight efficiently, die gallantly. Specialization is for insects.

(With apologies to [Robert Heinlein](http://c2.com/cgi/wik