View gist:1296340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[18-Oct-2011 18:50:22] SET NAME XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
[18-Oct-2011 18:50:22] - - - - - - - - this->name = dummy-test | |
[18-Oct-2011 18:50:22] SET QUALIFICATION XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
[18-Oct-2011 18:50:22] - - - - - - - - vary_cache_on_function = true | |
[18-Oct-2011 18:50:22] - - - - - - - - is_qualified = true | |
[18-Oct-2011 18:50:22] CHECKING FOR SEG XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
[18-Oct-2011 18:50:22] - - - - - - - - test = return (bool) isset( $_COOKIE["dummy-test"] ); | |
[18-Oct-2011 18:50:22] - - - - - - - - vary_cache_on_function = false | |
[18-Oct-2011 18:50:22] NEEDS SEGMENT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
View gist:1348409
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(root, factory) { | |
if (typeof exports === 'object') { | |
// Node/CommonJS | |
factory(require('jquery')); | |
} else if (typeof define === 'function' && define.amd) { | |
// AMD. Use a named plugin in case this | |
// file is loaded outside an AMD loader, | |
// but an AMD loader lives on the page. | |
define('myPlugin', ['jquery'], factory); | |
} else { |
View arena.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define( [ 'jquery', 'mods/crazydot' ], function( $, CrazyDot ){ | |
var dots = []; | |
var setup = function( cfg ){ | |
while ( dots.length < cfg.count ){ | |
dots.push( new CrazyDot( cfg.speed, 'body' ).move() ); | |
} | |
}; | |
var stopGame = function(){ |
View gist:5961163
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.config(function($routeProvider, $locationProvider){ | |
$locationProvider.html5Mode(true).hashPrefix('!'); | |
$routeProvider | |
.when('/', { | |
templateUrl: '/html/home.html', | |
controller: 'HomeCtrl' | |
}) | |
.when('/templates', { | |
templateUrl: '/html/tmpl.list.html', | |
controller: 'TmplCtrl' |
View tmpl.dialog.addimg.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('fileUpload', function($q){ | |
return { | |
send: function(files){ | |
var deferred = $q.defer(), | |
data = new FormData(), | |
xhr = new XMLHttpRequest(); | |
angular.forEach(files, function(file){ | |
data.append('file', file, file.name); | |
}); |
View gist:797d552bc8c47174c4e5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<!-- #container wraps the entire page's markup (except on-demand stuff like modals) --> | |
<!-- #container's children and classnames change based on the current view / route --> | |
<div id="#container" class="VIEW VIEW--MODE"> | |
<nav></nav> | |
<header></header> | |
<main></main> | |
<footer></footer> |
View viewport.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="HandheldFriendly" content="True" /> | |
<meta name="MobileOptimized" content="320" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" /> | |
<style> | |
html, | |
body { |
View gist:bc5de9dbdbf2d4f2b3524cbacf725844
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here's an interesting snippet from my `stats.json` file as generated by webpack v2.2.1 | |
notes: | |
+ for brevity, i've stripped out the actual "source": field | |
+ the only modules i recognize in the block copied below are: | |
* dom.js (/path/to/my/project/lib/client/util/dom.js - a module i wrote) | |
* transit.js (/path/to/my/project/node_modules/transit-js/transit.js - a dependency of a dependency) | |
+ both dom.js and transit.js use `Buffer` in the node.js context only (e.g. if node.js, use Buffer, else other thing) | |
+ `"userRequest": "Buffer"` <-- does this mean webpack found a mention of the `Buffer` variable and that's why it's being included? |
View codemod-react-proptypes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/////////////////////////////////////////////////////////////////////////////// | |
// USAGE: jscodeshift ./lib/ -t ./scripts/codemod-react-proptypes.js | |
/////////////////////////////////////////////////////////////////////////////// | |
module.exports = function(file, api){ | |
var js = api.jscodeshift, | |
root = js(file.source), | |
shouldFixWhitespace, | |
collection; |
View Foo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/components/Foo.js | |
import createClass from 'create-react-class'; | |
import { div, em } from 'react-dom-factories'; | |
import PropTypes from 'prop-types'; | |
export default createClass({ | |
displayName: 'Foo', | |
contextTypes: { | |
count: PropTypes.number |