Skip to content

Instantly share code, notes, and snippets.

View morgs32's full-sized avatar

Morgan Intrator morgs32

View GitHub Profile
@armhold
armhold / spotlight.js
Created June 11, 2012 15:25
jQuery Spotlight modification: added a hide() hook
/**
* jQuery Spotlight
*
* Project Page: http://dev7studios.com/portfolio/jquery-spotlight/
* Copyright (c) 2009 Gilbert Pellegrom, http://www.gilbertpellegrom.co.uk
* Licensed under the GPL license (http://www.gnu.org/licenses/gpl-3.0.html)
* Version 1.0 (12/06/2009)
*
* modified slightly by George Armhold to add a hide() hook for removing the spotlight programmatically.
*/
@tophtucker
tophtucker / .block
Last active March 12, 2017 13:36 — forked from mbostock/.block
Zoomable Icicle (d3 v4)
license: gpl-3.0
@dh94
dh94 / mdStyleColor.js
Last active April 12, 2017 09:11 — forked from ThadeuLuz/mdStyleColor.js
Trying to add more flexibility to elements css in angular-material
(function () {
"use strict";
var _theme;
var _palettes;
angular
.module('mdColors',['mdColors'])
.config(['$mdThemingProvider', function($mdThemingProvider){
@bennadel
bennadel / ng-if-false.htm
Created January 12, 2015 13:42
Creating A Pre-Bootstrap Loading Screen In AngularJS
<!-- BEGIN: Pre-Bootstrap Loading Screen. -->
<div ng-if="false">
<p>
This will show until the application is bootstrapped.
Then, the ngIf directive will immediately rip it out of
the page.
</p>
</div>
@chapati23
chapati23 / react-router-v4-page-transitions.jsx
Created November 8, 2016 22:41
React Router v4 Page Transitions
import React from 'react'
import { TransitionMotion, spring } from 'react-motion'
import Router from 'react-router/BrowserRouter'
import Match from 'react-router/Match'
import Link from 'react-router/Link'
import Redirect from 'react-router/Redirect'
const styles = {}
styles.fill = {
@martyndavies
martyndavies / rollup.sql
Created April 6, 2018 16:44
Example of a Postgres rollup
CREATE OR REPLACE FUNCTION compute_5min_rollups(start_time TIMESTAMP, end_time TIMESTAMP)
RETURNS void LANGUAGE PLPGSQL AS $function$
BEGIN
EXECUTE $$
INSERT INTO rollups_5min
SELECT
date_trunc('seconds', (timestamp - TIMESTAMP 'epoch') / 300) * 300 + TIMESTAMP 'epoch' AS minute,
app_id,
timestamp,
count(*) AS query_count,
@kaylarose
kaylarose / RaphaelJSShapeDrawingApp.html
Created November 11, 2010 21:07
A Simple Vector Shape Drawing App with RaphaelJS and jQuery
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script src="http://yandex.st/raphael/1.5.2/raphael.min.js"></script>
<script>
/**
* A Simple Vector Shape Drawing App with RaphaelJS and jQuery
* copyright 2010 Kayla Rose Martin - Licensed under the MIT license
* Inspired by http://stackoverflow.com/questions/3582344/draw-a-connection-line-in-raphaeljs
**/
@bevacqua
bevacqua / gulp-npm-publish.js
Created January 18, 2014 16:22
Publish packages to `npm` using Gulp.
var spawn = require('child_process').spawn;
gulp.task('npm', function (done) {
spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done);
});
@thebinarypenguin
thebinarypenguin / movable-resizable-raphael
Created January 4, 2012 02:43
Movable and re-sizable rectangle using Raphael SVG
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Movable and Re-sizable Raphael JS Shape</title>
</head>
<body>
<div id="paper"></div>

LESS Coding Guidelines

Medium uses a strict subset of LESS for style generation. This subset includes variables and mixins, but nothing else (no nesting, etc.).

Medium's naming conventions are adapted from the work being done in the SUIT CSS framework. Which is to say, it relies on structured class names and meaningful hyphens (i.e., not using hyphens merely to separate words). This is to help work around the current limits of applying CSS to the DOM (i.e., the lack of style encapsulation) and to better communicate the relationships between classes.

Table of contents