Skip to content

Instantly share code, notes, and snippets.

irony

Block or report user

Report or block irony

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Keybase public key
### 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:
View kodapor-with-comments-input.txt
This file has been truncated, but you can view the full file.
==================================
Erik Hellman: För de som är intresserade av hur vi jobbar på Spotify så finns det nu en riktigt bra film av Henrik Kniberg som beskriver det hela.
==================================
Adam Heidmark: Intressant!
Henrik Ismarker: Otroligt intressant. Tack!
Peter Holmdahl: Jag är besviken att kaffekoppen på bilden inte är med i videon :-(
Bra skit annars.
View twitter-lstm.js
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 Dec 17, 2017
God Jul Kodapor!
View letitsnow.js
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()
View modern-javascript.js
// 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
View config.json
{
"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.",
View encode-cluster.js
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)
View Parallax-with-CSS.markdown
View gist:d8f4a00caeedcb5dbadd
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){
You can’t perform that action at this time.