Skip to content

Instantly share code, notes, and snippets.

@Vijar
Vijar / middleware_summary.png
Last active November 16, 2015 19:00
Holodeck TDv2 v0.6
middleware_summary.png
module.exports = function MaterialUiPlugin() {
/**
* @class MaterialUiPlugin
*/
return {
/**
* @property {String} name Name of the plugin
*/
name: 'MaterialUiPlugin',
/**
@Vijar
Vijar / nginx_try_s3_fallback_ec2.conf
Created July 6, 2015 00:17
Try S3 for static content, then fallback to EC2 using Nginx as reverse proxy
location ~* ^/static/(.*) {
set $s3_bucket 'your_bucket.s3.amazonaws.com';
set $url_full '$1';
# Not sure if I need the following options or not, need to look into it.
proxy_http_version 1.1;
proxy_set_header Host $s3_bucket;
proxy_set_header Authorization '';
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
{
"name": "intl",
"version": "0.1.2",
"description": "polyfill the ECMA-402 Intl API (except collation)",
"main": ["Intl.js", "Intl.min.js"],
"keywords": [
"intl",
"i18n",
"internationalization",
"ecma402",
/*! gridster.js - v0.1.0 - 2013-02-15
* http://gridster.net/
* Copyright (c) 2013 ducksboard; Licensed MIT */
(function(e,t,n,r){function i(t){return t[0]&&e.isPlainObject(t[0])?this.data=t[0]:this.el=t,this.isCoords=!0,this.coords={},this.init(),this}var s=i.prototype;s.init=function(){this.set(),this.original_coords=this.get()},s.set=function(e,t){var n=this.el;n&&!e&&(this.data=n.offset(),this.data.width=n.width(),this.data.height=n.height());if(n&&e&&!t){var r=n.offset();this.data.top=r.top,this.data.left=r.left}var i=this.data;return this.coords.x1=i.left,this.coords.y1=i.top,this.coords.x2=i.left+i.width,this.coords.y2=i.top+i.height,this.coords.cx=i.left+i.width/2,this.coords.cy=i.top+i.height/2,this.coords.width=i.width,this.coords.height=i.height,this.coords.el=n||!1,this},s.update=function(t){if(!t&&!this.el)return this;if(t){var n=e.extend({},this.data,t);return this.data=n,this.set(!0,!0)}return this.set(!0),this},s.get=function(){return this.coords},e.fn.coords=function(){if(this.data("coords"))r