Skip to content

Instantly share code, notes, and snippets.


Maximilian Hoffmann maxhoffmann

View GitHub Profile
jackfuchs /
Last active Aug 26, 2019
Extends the object to CSS Properties
* To verify that a CSS property is supported
* (or any of its browser-specific implementations)
* @param p css property name
* @param rp optional, if set to true, the css property name will be returned
* instead of a boolean support indicator
* @return {mixed}
gre / easing.js
Last active Jun 15, 2021
Simple Easing Functions in Javascript - see
View easing.js
* Easing Functions - inspired from
* only considering the t value for the range [0, 1] => [0, 1]
EasingFunctions = {
// no easing, no acceleration
linear: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity
View ios-8-web-app.html
<!doctype html>
<!-- -->
<title>iOS 8 web app</title>
cowboy / Abstraction.js
Created May 24, 2012
A modern JavaScript if-elseif-else abstraction, because control flow statements are so 1995
View Abstraction.js
* Abstraction.js
* Copyright (c) 2012 "Cowboy" Ben Alman
* Licensed under the MIT license.
var Abstraction = (function($) {
var _ = $.prototype;
trcarden / gist:3295935
Created Aug 8, 2012
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
View gist:3295935
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
paulmillr /
Last active Oct 12, 2015
Safari web inspector evolution

As a developer, i’m curious what happens to tools I use. Some time ago I decided to log all changes in web inspectors of browsers.

So far list includes only Safari and Firefox primarly because it’s easy to track their changes. In the future other browsers will be in too.

Safari web inspector evolution

  • August 2012: Initial release of new safari web inspector. It had terrible UI / UX.
  • October:
    • Reduced main panels count from 8 to 3-4.
  • November:
desandro /
Created Jan 31, 2013
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.

dustinsenos / gist:5294392
Created Apr 2, 2013
Retina Mouse Cursor Files. Below is the file location of the retina mouse cursors on OS X 10.8.3. All files are .pdfs (thanks Apple) so they should work perfectly in Photoshop, Illustrator etc.
View gist:5294392
View express-static.js
function onlyStatic (middleware) {
return function (req, res, next) {
var match = /(\.css|\.eot|\.gif|\.html|\.js|\.png|\.svg|\.ttf|\.woff|\.jpg)($|\?.*$)/ig.exec(req.originalUrl);
if (!match) return next();
middleware(req, res, next);
this.use(onlyStatic(express.static(__dirname + "/public")));
View bloop.js
(function() {
// Do not use this library. This is just a fun example to prove a
// point.
var Bloop = window.Bloop = {};
var mountId = 0;
function newMountId() {
return mountId++;