Skip to content

Instantly share code, notes, and snippets.

View yields's full-sized avatar
:octocat:
☕ 💻

Amir Abushareb yields

:octocat:
☕ 💻
View GitHub Profile
/**
* Require the module at `name`.
*
* @param {String} name
* @return {Object} exports
* @api public
*/
function require(name) {
var module = require.modules[name];
var integration = require("integration");
var load = require("segmentio-load-script");
$ configure < my-app.json
configure : my-app
install : nginx
start : nginx
install : nodejs
start : my-app
took : 1457ms
configure()
.use(nginx())
.use(nodejs())
.use(myapp())
.end();
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
window.analytics || (window.analytics = []), window.analytics.methods = ["identify", "track", "trackLink", "trackForm", "trackClick", "trackSubmit", "page", "pageview", "ab", "alias", "ready", "group", "on", "once", "off"], window.analytics.factory = function (t) {
return function () {
var a = Array.prototype.slice.call(arguments);
return a.unshift(t), window.analytics.push(a), window.analytics
}
// sources: https://segment.io/libraries/analytics.js#getting-started
// https://github.com/phillbaker/analytics-js-rails/blob/master/app/views/analytics-js/_loader.html.erb
// Create a queue, but don't obliterate an existing one!
window.analytics || (window.analytics = []);
// A list of all the methods in analytics.js that we want to stub.
window.analytics.methods = ['identify', 'track', 'trackLink', 'trackForm',
'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready',
'group', 'on', 'once', 'off'];
var rework = require('rework');
var stdin = require('stdin');
var gm = require('gm');
stdin(function(str){
rework(str)
.use(rework.at2x())
.use(rework.url(retina))
.toString();
list = list(users, el)
.append('g')
.translate(': age * 13', 0)
.map(': age')
.append('rect')
.height(11)
.width(11)
.style('fill', '#eee')
.y(': i * 13');
@yields
yields / gist:6648453
Created September 21, 2013 08:11
webkit pseudo elements
λ webkit grep -nr "::-webkit-" . | sed -En 's/.*(::-webkit-[a-z]+(-[a-z]+)?).*/\1/p' | sort -u
::-webkit-appearance
::-webkit-calendar-picker
::-webkit-calendar-pixker
::-webkit-clear-button
::-webkit-color-swatch
::-webkit-date-and
::-webkit-date-time
::-webkit-datetime-edit
@yields
yields / gist:6648240
Last active January 15, 2018 13:32
firefox pseudo elements
λ mozilla grep -nr "::-moz-" . | sed -En 's/.*(::-moz-[a-z]+(-[a-z]+)?).*/\1/p' | sort -u
::-moz-anonymous-flex
::-moz-anonymous-positioned
::-moz-button-content
::-moz-canvas
::-moz-cell-content
::-moz-column-content
::-moz-display-comboboxcontrol
::-moz-dropdown-list