Skip to content

Instantly share code, notes, and snippets.

View irony's full-sized avatar

Christian Landgren irony

View GitHub Profile
### 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:
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 } }
@irony
irony / letitsnow.js
Created December 17, 2017 18:34
God Jul Kodapor!
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()
{
"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.",
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)
@irony
irony / gist:d8f4a00caeedcb5dbadd
Created December 2, 2014 07:44
enkel api setup
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){
@irony
irony / Parallax-with-CSS.markdown
Created September 16, 2013 21:08
A Pen by irony.
@irony
irony / modern-javascript.js
Created January 29, 2012 18:27
Modern Javascript
// 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