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
{ | |
"name": "fakeeh", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"bcrypt": "^1.0.1", | |
"body-parser": "^1.17.2", | |
"express": "^4.15.4", | |
"jsonwebtoken": "^7.2.1", | |
"material-ui": "^0.19.0", |
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
import React from 'react'; | |
import ReactDom from 'react-dom'; | |
import injectTapEventPlugin from 'react-tap-event-plugin'; | |
import getMuiTheme from 'material-ui/styles/getMuiTheme'; | |
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; | |
import { browserHistory, Router } from 'react-router'; | |
import routes from './routes.js'; | |
// remove tap delay | |
injectTapEventPlugin(); |
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
$ time strace -e trace=open,close,read,write,connect,accept jscs file.js | |
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
close(3) = 0 | |
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 | |
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832 | |
close(3) = 0 | |
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 | |
close(3) = 0 | |
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 |
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
// document.onkeydown=checkArrowKeys; | |
document.addEventListener('keydown', checkArrowKeys); | |
function checkArrowKeys(e) { | |
var evt = e ? e : event; | |
var mykey = evt.keyCode; | |
if ((mykey == 37) && (prevKnot > 1)) { | |
showButtons(ButtonFadeDelay); | |
elemQ = document.getElementById('Prelim'); // Get Identity | |
elemQ.style.zIndex = -2; // Hide Labelled Image If Showing |
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
From ce4dafd211f5283e9c47cf42bbda93998f88ca65 Mon Sep 17 00:00:00 2001 | |
From: Luke Hudson <[email protected]> | |
Date: Tue, 7 Jul 2015 13:44:03 +0200 | |
Subject: [PATCH] DEBUG: Tag HTML with source templates | |
This can be used with a small script as follows to debug your | |
templates. | |
https://gist.github.com/lingo/11476ce245cb05aec543 | |
--- |
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
/** | |
* This works with the patch here: | |
* https://gist.github.com/lingo/5fd432cfb70758907f85 | |
*/ | |
var style = document.createElement('style'); | |
style.textContent = | |
'.sstemplate: hover {' + |
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
/** | |
* To be used as a bookmarklet | |
* See: https://trello.com/c/PkIrgKzd/36-show-card-numbers | |
*/ | |
(function(){ | |
var e="display: inline-block !important; font-weight: bold; font-size: 16px; background: #E3E3E3; color: #0e74af; padding: 0.25em; border-radius: 5px 0 00; position: absolute; bottom: 0em; right: 0;"; | |
$("<style>.card-short-id.hide {"+e+"}</style>").appendTo(document.head); | |
})(); |
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
var request = require('supertest-as-promised'), | |
Promise = require('bluebird'), | |
should = require('should'); | |
var game = require('../game.js').app; | |
// Instead of assertScoreEquals, we now fetch the score | |
// and assert when the promise returns a value | |
var getScore = function() { | |
return request(game).get('/score').expect(200) |
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
> [email protected] test /tmp/superagent | |
> make test | |
․․․․․․․․․․․․․․․double callback! | |
․double callback! | |
․double callback! | |
․double callback! | |
․double callback! |
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
// mylogic.js | |
var MyLogic = { | |
_currentAccount: null, | |
fetchAccountByID: function(id) { | |
// fetch account from database, use promises to reject/resolve | |
}, | |
setCurrentAccount: function(account) { | |
MyLogic._currentAccount = account; | |
} |
NewerOlder