Skip to content

Instantly share code, notes, and snippets.

View marclundgren's full-sized avatar

Marc Lundgren marclundgren

View GitHub Profile
@marclundgren
marclundgren / announce-progress.js
Last active August 29, 2015 14:02
Liferay Upload & Document Library Upload class abstraction
/*******************************************
* These items are in progress...
*
* Leave feedback in the comments section.
*******************************************/
@blzaugg
blzaugg / restroomEtiquette.js
Created March 20, 2013 22:17
restroomEtiquette
function restroomEtiquette(you, restroom) {
while (true) {
if (you.needToGo === 1) {
if (you.okayWithUrinals && restroom.urinalAvailable()) {
var urinal = restroom.occupyAvailableUrinal(you);
you.evacuate(urinal);
urinal.flush();
@marclundgren
marclundgren / in.n.out.md
Last active December 22, 2015 22:49
My Favorite In N Out order

My Favorite In N Out order

  • Three-by-One (3 meat, 1 cheese)
  • mustard instead of spread
  • grilled unions
  • add pickles
  • add chopped chilis
  • add extra everything (all teh veggies)
@marclundgren
marclundgren / os-x-configuration.md
Last active January 2, 2016 16:09 — forked from g3d/gist:2709563
OS X Configuration
function Vb(d) {
d = d | 0;
var e = 0, f = 0, h = 0, j = 0, k = 0, l = 0, m = 0, n = 0,
o = 0, p = 0, q = 0, r = 0, s = 0;
e = i;
i = i + 12 | 0;
f = e | 0;
h = d + 12 | 0;
j = c[h >> 2] | 0;
if ((j | 0) > 0) {
@lukemelia
lukemelia / note.txt
Created April 8, 2015 04:34
When Error: watch EMFILE strikes (OS X)
This requires `brew install jq` which is a command json query.
I got this from @krisselden
@bringking
bringking / gist:2a2f4469d8c60fe1a347
Last active November 21, 2017 00:54
Accordion control built with ReactJS and elierotenberg/react-animate
'use strict';
var React = require('react/addons');
var AnimateMixin = require('react-animate');
/**
* Accordion object that maintains a list of content containers and their collapsed or expanded state
* @type {*|Function}
*/
var Accordion = React.createClass({
/**
// Example
// app.js
document.addEventListener("DOMContentLoaded", function (e) {
m.route.mode = "hash";
m.route(document.getElementById("application"), "/", {
"/": m.resolve("pages.home"),
"/findus": m.resolve("pages.findus")
});
});
@barneycarroll
barneycarroll / animator.js
Last active June 11, 2021 05:06
A factory for decorating Mithril modules / views / elements with incoming and outgoing animations.
var animating = false;
// Define an animator consisting of optional incoming and outgoing animations.
// alwaysAnimate is false unless specified as true: false means an incoming animation will only trigger if an outgoing animation is also in progress.
// forcing dontClone to true means the outward animation will use the original element rather than a clone. This could improve performance by recycling elements, but can lead to trouble: clones have the advantage of being stripped of all event listeners.
function animator( incoming, outgoing, alwaysAnimate, dontClone ){
// The resulting animator can be applied to any number of components
return function animate( x, y, z ){
var config;
var parent;