This file contains hidden or 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
// Scrambled text effect from cultura.xyz | |
// Can be looped, applied to other elements | |
class TextScramble { | |
constructor(el) { | |
this.el = el; | |
this.chars = "!<>-_\\/[]{}—=+*^?#________"; | |
this.update = this.update.bind(this); | |
} |
This file contains hidden or 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
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. | |
"node" : false, |
This file contains hidden or 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
#!/bin/sh | |
if [ ! -t 0 ]; then | |
echo >&2 'STDIN is not a terminal' | |
exit 1 | |
fi | |
clear | |
cd "$(mktemp -d)" |
This file contains hidden or 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 () { | |
console.log('hello world'); | |
} |
This file contains hidden or 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
You need- | |
2 slices of bread | |
butter (or, if you insist, some sort of buttery spread) | |
cheese of your choice (yellow cheese like colby or cheddar is most standard, but you can use about anything) | |
Butter one slice of bread, place it butter side down in a frying pan. Arrange cheese to cover bread in a relatively uniform thickness. Butter second piece of bread, place on top of cheese butter side up. | |
Now, there are multiple ways to cook it. My personal favourite, because I tend to wander away from the stove, is to put it on fairly low. (relative, because I don't know what your stove is aasdasdlike.) Check it periodically. If you hear it sizzling or you smell burning, you probably didn't check it soon enough. | |
When the cheese starts glistening and softening at the edges, flip it. Alternatively, periodically lift the sandwich and peer underneath. You want it a golden brown, darkness depending on personal taste. I prefer mine reasonably dark but not black in any way. | |
Flip, carefully. One way- Pick up sandwich on spatula |
This file contains hidden or 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 node.js module dependencies | |
var express = require('express'); | |
// Initialize API services | |
var app = express.createServer(express.logger()); | |
// Set up static directories | |
app.configure(function(){ | |
app.use('/',express.static(__dirname)); | |
}); |
This file contains hidden or 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
require(['libs/now/0.7.4/now'], function(Now) { | |
Now.pong = function(){ | |
alert('pong!'); | |
} | |
Now.ping(); | |
} |
This file contains hidden or 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(function() { | |
(function () { | |
var nowObjects = {}; | |
var noConflict = function (uri, options) { | |
uri = uri || ''; | |
if (nowObjects[uri]) { | |
return nowObjects[uri]; | |
} | |
options = options || {}; |
This file contains hidden or 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
// Objects is an array of items to populate options | |
select | |
- each object in objects | |
option #{object} |
This file contains hidden or 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
/* Requires */ | |
// Set up connect-couchdb | |
var store = new ConnectCouchDB({ | |
// Name of the database for sessions. | |
name: 'myreci-web-sessions', | |
// Optional. How often expired sessions should be cleaned up. | |
// Defaults to 600000 (10 minutes). | |
reapInterval: 600000, |