Skip to content

Instantly share code, notes, and snippets.

Ahmid snuggs

Block or report user

Report or block snuggs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@snuggs
snuggs / speedshop.md
Created May 8, 2017 — forked from nateberkopec/speedshop.md
Speedshop Contract
View speedshop.md

This is a Services Agreement between The Speedshop Ltd. Co. (“we,” “us,” “our”) and any individual, entity, or organization that procures our services (“you” or “your”).

  1. Acceptance of Terms: Any work that we do for you is governed by the terms and conditions that you’re reading now. If you don’t agree to them, we can’t provide you with any services. This agreement is a binding contract between you and The Speedshop.
  2. Terms May Change: Periodically, we may change the terms and conditions in this agreement, including the amount of our fees. If we do change any of these terms, they’ll take effect for you the next time that you contract for our services. Any work that we’ve already completed or previously initiated for you continue to be governed by the agreement in effect at the time that you contracted with us.
  3. Taxes: You are responsible for payment of all applicable sales and use taxes.
  4. Refund: If you’re genuinely dissatisfied with our services and provide us with notice within thirty (30) days of
@snuggs
snuggs / 0Option2ConstructorSummary.md
Created Mar 19, 2017 — forked from allenwb/0Option2ConstructorSummary.md
New ES6 constructor features and semantics: Alternative 2 manual super in derived classes
View 0Option2ConstructorSummary.md

New ES6 Constructor Semantics and Usage Examples

Manual super: Alternative Design where subclass constructors do not automatically call superclass constructors

This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.

One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.

An alternative version of this design automatically invokes the base constructor in most situations.

View Auto id or name mapping to Window
day
<template name=​"day" id=​"day">​…​</template>​
var a = document.createElement ('img')
undefined
a.name = 'Tara'
"Tara"
document.body.append (a)
undefined
Tara
<img name=​"Tara">​
@snuggs
snuggs / watch.es
Last active Mar 2, 2017
#devPunk App File Watcher `$ node watch.es`
View watch.es
const dir = './'
, command = `node --harmony index.es` // put your command here
, exec = require ('child_process').exec
require ('fs').watch (dir, { recursive: true },
(event, file) => {
// Vim causes tmp file update `4913`
// https://github.com/bevry/watchr/issues/33
// specific to .es files. Can remove line for all files
@snuggs
snuggs / tabs.before.html
Last active Mar 12, 2017
#devPunk Pure CSS Tabs
View tabs.before.html
<!-- This doesn't work at all -->
<!-- Toggle -->
<div class="dropdown">
<a class="dropdown-inline-button" href="javascript: void(0);" data-toggle="tab"
data-target="#calibration">
<i class="dropdown-inline-button-icon icmn-database"></i>
Mostrar calibraciones
</a>
</div>
@snuggs
snuggs / typography.css
Last active Feb 23, 2017
#devPunk HTML5 Responsive Typography Guide http://devpunks.com/typography.html
View typography.css
@import url('https://fonts.googleapis.com/css?family=Ubuntu:300,300i,400,400i,500,500i,700,700i');
:root {
--rem: 3.6vw;
--margin: 0 2vw;
}
@media screen and (min-width: 786px) {
:root {
--rem: 2.6vw;
@snuggs
snuggs / fetch.es
Created Feb 21, 2017
WHATWG Fetch Polyfill
View fetch.es
// require('whatwg-fetch');
function apiError (status, message) {
var err = new Error(message);
err.status = status;
return err;
}
function onAPIError (res) {
return res.json().then(function (json) {
@snuggs
snuggs / holygrail.html
Last active Mar 4, 2017
#devPunks "HOLY Holy Grail🏆" CSS/HTML5 Mobile/Desktop Responsive Layout with Flexbox
View holygrail.html
<title>#devPunks "HOLY Holy Grail🏆" CSS/HTML5 Mobile/Desktop Responsive Layout with Flexbox</title>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
:root {
--lighter: #ccc;
--lightest: #fff;
--darker: #999;
@snuggs
snuggs / inject.js
Last active Feb 16, 2017
dynamic script `inject`ion module with refactor
View inject.js
// https://github.com/ded/script.js
// injects script @ `url` after current script
// http://stackoverflow.com/questions/5168451/javascript-require-on-client-side#answer-8536369
function inject (url, options) {
options = options || {}
var script = document.createElement ('script')
script.src = url.match (/\.js$/) ?
url : `${url}.js`
@snuggs
snuggs / mo_vs.proxy.js
Created Feb 11, 2017 — forked from ebidel/mo_vs.proxy.js
MutationObserver vs. Proxy to detect .textContent changes
View mo_vs.proxy.js
<!--
This demo shows two ways to detect changes to a DOM node `.textContent`, one
using a `MutationObserver` and the other using an ES2015 `Proxy`.
From testing, a `Proxy` appears to be 6-8x faster than using a MO in Chrome 50.
**Update**: removing the `Proxy` altogether speeds up the MO to be inline with the Proxy.
This has something to do with how the browser queues/prioritizes Proxies over MO.
You can’t perform that action at this time.