Skip to content

Instantly share code, notes, and snippets.

View ek's full-sized avatar

Eric ek

View GitHub Profile
@ek
ek / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../google-map/google-map-directions.html">
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../smoothie-chart/smoothie-chart.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
@ek
ek / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ek
ek / error.js
Created March 16, 2015 03:22
Error using usage snippet for x-ray-phantom
.use(phantom())
^
TypeError: object is not a function
at Object.<anonymous> (/Users/212341175/workspace/repos/kexp/xray.js:5:8)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
@ek
ek / SlideshowView.as
Created August 11, 2015 15:44
SlideshowView.as - ActionScript 3
package wolken.slideshow {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.text.TextField;
import flash.display.MovieClip;
import flash.display.LoaderInfo;
import flash.display.SimpleButton;
import fl.transitions.Tween;
@ek
ek / EdgemoorIntro.as
Created August 11, 2015 15:48
EdgemoorIntro.as - Actionscript 3 - Animation code for Edgemoor
package wolken.edgemoor {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
@ek
ek / L1Animation.as
Last active August 29, 2015 14:27
Animation code for L1 Outerwear 2008 Flash site
// help the book get centered...
_root.bookOffsetX = 220;
_root.bookOffsetY = 400;
// this function runs every time the window is resized.
var resizeFunction = function() {
// find the scale for book_mc
stagewidth = Stage.width;
stageheight = Stage.height;
@ek
ek / generateUniqueId.js
Created January 19, 2016 02:12
generate a unique UUID using Javascript Math.random
// from alexmorleyfinch's comment on this thread:
// https://gist.github.com/gordonbrander/2230317#gistcomment-1618310
var generateUniqueId = function(){
function chr4(){
return Math.random().toString(16).slice(-4);
};
return chr4() + chr4() +
'-' + chr4() +
'-' + chr4() +
'-' + chr4() +
@ek
ek / extract-query-string-variable.js
Created March 12, 2016 00:06
Extract a variable from window.location query string
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
@ek
ek / build-to-grow-no-silver-bullet-snip.txt
Created August 9, 2016 05:46
Brooks suggesting a move from "build" to "grow" as the key metaphor in software development
In "No Silver Bullet" [1] Brooks wrote in 1986:
"I still remember the jolt I felt in 1958 when I first heard a friend talk about building a program,
as opposed to writing one. In a flash he broadened my whole view of the software process. The
metaphor shift was powerful, and accurate. Today we understand how like other building processes the
construction of software is, and we freely use other elements of the metaphor, such as
specifications, assembly of components, and scaffolding."
"The building metaphor has outlived its usefulness. It is time to change again. If, as I believe,
the conceptual structures we construct today are too complicated to be specified accurately in
@ek
ek / output
Created July 20, 2018 19:19
yarn upgrade output
➜ promotions-personalized-offers-ui git:(master) yarn upgrade @appfabric/plugin-build@3.11.2
yarn upgrade v1.7.0
[1/4] 🔍 Resolving packages...
warning @appfabric/plugin-build > babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
warning @appfabric/plugin-build > babel-relay-plugin@0.8.1: Replaced by the new babel-plugin-relay
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "@cg/partnerplatform-web-shared > uglifyjs-webpack-plugin@1.2.5" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning "@cg/partnerplatform-web-shared > uglifyjs-webpack-plugin > schema-utils@0.4.5" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning " > react-modal@3.3.2" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16".