Skip to content

Instantly share code, notes, and snippets.

@cheapsteak
cheapsteak / gist:5205777
Last active December 15, 2015 04:59 — forked from radiosilence/gist:4040553
Zurb Foundation 4 Shim for RequireJS.
/**
* You might want to change baseUrl to something else depending on where your require.js is.
* If you want to do conditional loading of Zepto, take a look at the discussion at
* https://groups.google.com/forum/?fromgroups=#!topic/requirejs/68oIXcyou48
* Had to add explicit paths for each plugin, otherwise `require` tries to look for it in
* /foundation/foundation/foundation.alerts.js
*/
require.config({
baseUrl: "js",
@cheapsteak
cheapsteak / 0_reuse_code.js
Created July 8, 2014 21:37
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
// ==UserScript==
// @name Monster Minigame Auto-script
// @namespace https://github.com/wchill/steamSummerMinigame
// @description A script that runs the Steam Monster Minigame for you. Modified from mouseas's original version to include autoclick.
// @version 1.0
// @match http://steamcommunity.com/minigame/towerattack*
// @updateURL https://raw.githubusercontent.com/wchill/steamSummerMinigame/master/autoPlay.js
// @downloadURL https://raw.githubusercontent.com/wchill/steamSummerMinigame/master/autoPlay.js
// ==/UserScript==
import React from 'react';
import { render } from 'react-dom';
class Page extends React.Component {
state = {
shouldShowBox: true
};
toggleBox = () => {
@cheapsteak
cheapsteak / box.jsx
Created January 24, 2017 02:47 — forked from anonymous/box.jsx
class Box extends React.Component {
componentWillEnter (callback) {
const el = this.container;
TweenMax.fromTo(el, 0.3, {y: 100, opacity: 0}, {y: 0, opacity: 1, onComplete: callback});
}
componentWillLeave (callback) {
const el = this.container;
TweenMax.fromTo(el, 0.3, {y: 0, opacity: 1}, {y: -100, opacity: 0, onComplete: callback});
}