An example of parallax scrolling with almost only CSS.
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
### Keybase proof | |
I hereby claim: | |
* I am irony on github. | |
* I am irony (https://keybase.io/irony) on keybase. | |
* I have a public key ASAikny5No2QB3zSMY3S1QAo3xbHl4uSwevB6zTbtj95LAo | |
To claim this, I am signing this object: |
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 brain = require('brain.js') | |
const net = new brain.recurrent.LSTM() | |
net.train([ | |
{ input: 'Inside Chi’s nursery', output: { kardashian: 1 } }, | |
{ input: 'Why I dyed my hair pink', output: { kardashian: 1 } }, | |
{ input: 'Feeling Blue (wearing @kkwbeauty powder contour in medium & dark contour kit as eye shadow, & a new lip coming soon)', output: { kardashian: 1 } }, | |
{ input: 'I will be interviewed by @JudgeJeanine on @FoxNews at 9:00 P.M. Enjoy!', output: { trump: 1 } }, | |
{ input: 'Dem Memo: FBI did not disclose who the clients were — the Clinton Campaign and the DNC. Wow!', output: { trump: 1 } }, | |
{ input: 'Thank you to the great men and women of the United States @SecretService for a job well done!', output: { trump: 1 } } |
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 outside = {weather: FRIGHTFUL} | |
const inside = {fire: DELIGHTFUL} | |
const go = places => places.some(p=>p>outside.weather))) | |
const snow = () => (outside.weather < inside.fire && !go(places)) { | |
let it = snow() | |
} | |
let it = snow() |
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
{ | |
"bridge": { | |
"name": "Homebridge", | |
"username": "CC:22:3D:E3:CE:30", | |
"port": 51826, | |
"pin": "031-45-154" | |
}, | |
"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.", |
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 fs = require('fs') | |
var Iconv = require('iconv').Iconv | |
var cluster = require('cluster') | |
if (cluster.isMaster) [1, 2, 3, 4].forEach(_ => cluster.fork()) | |
var converter = new Iconv('UTF-8', 'UTF-16LE') | |
var input = fs.createReadStream('./enwik8') | |
var out = fs.createWriteStream('outfile' + new Date()) | |
input.pipe(converter).pipe(out) |
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 storage = {}; | |
var express = require('express') | |
var app = express() | |
app.post('/:id', function(req,res){ | |
storage[req.id] = req.body; | |
res.json(true); | |
}); | |
app.delete('/:id', function(req,res){ |
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
// Lets start with an array | |
var array = ['hello', 'world']; | |
// forEach is supported from Javascript 1.6 which means it works in new browsers incl IE9 (not IE8 and back) | |
array.forEach(function(item){ | |
console.log(item) | |
}); | |
// other new array features is like LINQ i C#. filter() returns a new list filtered by the function |