Few bonus inputs (randomized by rows^(rows-1) moves)
5: {"puzzle":[[2,5,13,11,17],[20,3,-1,12,7],[24,22,9,14,1],[10,15,18,21,4],[16,8,23,6,19]]}
5: {"puzzle":[[2,24,3,18,14],[16,7,8,17,15],[4,13,11,21,1],[12,23,9,6,10],[19,-1,22,5,20]]}
6: {"puzzle":[[29,24,28,34,35,21],[1,7,20,31,22,-1],[18,17,9,25,23,19],[6,30,8,3,32,13],[27,2,15,4,10,26],[5,33,12,14,16,11]]}
6: {"puzzle":[[11,1,7,8,33,4],[3,19,26,9,25,16],[20,23,24,34,32,14],[31,21,35,27,5,-1],[30,6,15,2,29,28],[12,22,17,10,13,18]]}
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
const Web3 = require('web3'); | |
const fs = require('fs'); | |
const web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8945')); | |
web3.BigNumber.config({ EXPONENTIAL_AT: 1000 }); | |
LunarAddress = '0x43fb95c7afa1ac1e721f33c695b2a0a94c7ddab2'; | |
LunarAbi = [{"constant":false,"inputs":[{"name":"enabled","type":"bool"}],"name":"setSubdivisionEnabled","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"metadata","type":"string"},{"name":"forSale","type":"bool"},{"name":"newPrice","type":"uint256"}],"name":"purchase","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"numPlots","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":fal |
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 performTask(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
// this wont work as intended | |
async function asyncFn1() { | |
const someTasks = [1, 2, 3, 4, 5]; | |
let taskSum = 0; | |
someTasks.forEach(async t => { | |
await performTask(t); |
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'; | |
/** | |
npm i bluebird slack-node | |
CREATE YOUR TOKEN: https://api.slack.com/docs/oauth-test-tokens?team_id=T024G49EC&action=reissue&sudo=1 | |
npm package: https://www.npmjs.com/package/slack-node | |
user.list: https://api.slack.com/methods/users.list |
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
server | |
.register({ | |
// https://www.npmjs.com/package/good | |
register: Good, | |
options: { | |
reporters: [{ | |
reporter: require('good-console'), | |
events: { | |
response: '*', |
- x Hapi.js (SERVER FRAMEWORK) http://hapijs.com/ - http://webchat.freenode.net/?channels=hapi - https://github.com/hapijs/hapi/issues?q=is%3Aclosed+label%3A%22release+notes%22
- x Joi (SCHEMA) https://github.com/hapijs/joi
- React.js (UI) (see https://mail.google.com/mail/u/0/#inbox/153be2a6cbe7ab85)
- Redux (CLIENT FRAMEWORK)
- Review Grunt (review)
- Review Angular (review 1.3)
- MongoDB 3 (review changes)
- Webpack (PACKER)
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
already have downloaded too | |
http://www.uxpin.com/consistency-ui-design-creativity.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
var express = require('express'); | |
var app = express(); | |
var co = require('co'); | |
function * sleep(){ | |
var p = new Promise(function(w,f){ | |
setTimeout(w,1000,'winning'); | |
}); | |
return yield p; |
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 failPromise = new Promise(function(accept,reject){ | |
setTimeout(reject,1000,'fail'); | |
}); | |
// won't see the numbers logged, will skip to the fail | |
failPromise.then(()=> console.log(1)) .then(()=> console.log(2)) .catch((e)=> console.log(':::%s',e)); |
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
cat <<EOT > .git/hooks/pre-push | |
#!/bin/sh | |
npm test | |
EOT | |
chmod +x .git/hooks/pre-push |