Skip to content

Instantly share code, notes, and snippets.

@MaZderMind
MaZderMind / require.js
Last active August 29, 2015 14:01 — forked from louisstow/require.js
/**
* Shim the require function used in node.js
*/
(function() {
if (window.require !== undefined)
throw 'RequireException: \'require\' already defined in global scope';
window.require = function(module) {
var url = window.require.resolve(module);
@MaZderMind
MaZderMind / easing.py
Last active August 29, 2015 14:26 — forked from th0ma5w/easing.py
Easing Equations in Python (orig by Robert Penner)
# ported from http://www.gizma.com/easing/ to https://gist.github.com/th0ma5w/9883420
# added some from https://gist.github.com/cleure/e5ba94f94e828a3f5466
# added some from http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js
import math
def easeLinear(t, b, c, d):
return c*t/d + b
def easeInQuad(t, b, c, d):
@MaZderMind
MaZderMind / osmium.rb
Created April 26, 2012 14:57 — forked from christoph-buente/osmium.rb
Osmium Homebrew formula
require 'formula'
class Osmium < Formula
head 'https://github.com/joto/osmium.git'
homepage 'http://wiki.openstreetmap.org/wiki/Osmium'
md5 'dce9eb59d86caf1186fc93567b94feed'
depends_on 'boost'
depends_on 'lzlib'
depends_on 'shapelib'
@MaZderMind
MaZderMind / commit.bash
Last active May 23, 2017 10:00 — forked from dedeibel/commit.fish
fish function that prepares a git commit command with message containing the jira ticket number
# commit with juira-ticket-id shortcut
#
# install via `cat commit.bash >> ~/.bashrc`
# Use:
# Assuming you are in a git repository of a bitbucket / jira branch using the atlassian jira git flow conventions
# example "feature/EXP-1337-cool-new-feature
#
# > commit -a
# will call
# > git commit -em "EXP-1337: " -a
@MaZderMind
MaZderMind / LambdaMatcher.java
Created July 3, 2017 10:00 — forked from GuiSim/LambdaMatcher.java
Hamcrest matcher that matches a Lambda.
package util.matcher;
import java.util.function.Function;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
public class LambdaMatcher<T> extends BaseMatcher<T> {
private final Function<T, Boolean> matcher;
private final String description;