Skip to content

Instantly share code, notes, and snippets.

View grimen's full-sized avatar

Jonas Grimfelt grimen

View GitHub Profile
local http = require('http')
http.createServer(function (req, res)
local body = "Hello world\n"
res:setHeader("Content-Type", "text/plain")
res:setHeader("Content-Length", #body)
res:finish(body)
end):listen(1337, '127.0.0.1')
print('Server running at http://127.0.0.1:1337/')
#!/usr/bin/env sh
# Install Luvit
cd /
curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh
/lit make lit://luvit/luvit
# Get example script
curl -O https://gist.githubusercontent.com/grimen/8163a5177e9e8603b1b6/raw/5cade52f6703eb99f7afff41035f5d99f5f7c9bf/luvit.lua
/*eslint-env es6:false*/
/*
* Copyright (c) 2010 Arc90 Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@grimen
grimen / index.js
Last active October 23, 2016 20:23
'use strict'
const cluster = require('cluster')
const assert = require('assert')
const util = require('util')
const os = require('os')
const PrettyError = require('pretty-error')
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
process.env.NODE_CLUSTER = process.env.NODE_CLUSTER || process.env.WEB_CONCURRENCY // heroku
process.env.DEBUG = process.env.DEBUG || 'app*'
@grimen
grimen / SublimeLinter.sublime-settings
Created January 3, 2017 16:02
SublimeLinter - User
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"eslint": {
@grimen
grimen / .eslintrc
Last active January 12, 2017 20:32
ESLint config
{
"extends": [
"eslint:recommended",
"airbnb-base"
],
"parser": "babel-eslint",
"env": {
"es6": true,
"node": true
},
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
url
http://images.asos-media.com/products/elise-ryan-ruched-waist-lace-midi-dress/7695190-1-steelgreen?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/boohoo-floral-tie-front-smock-dress/7704909-1-multi?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/asos-salon-fluro-stripe-smock-dress/7535168-1-multi?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/asos-drop-hem-dress-in-pastel-blue-check/7648235-1-blue?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/tfnc-wedding-maxi-dress-with-embellishment/7415455-1-grey?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/polo-ralph-lauren-towelling-beach-dress/7740410-1-navy?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/asos-premium-sleeveless-broderie-skater-dress-with-ruffle-and-open-back/7580972-1-blue?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/superdry-midi-multi-colour-bodycon-stripe-dress/7765125-1-blackmultistripe?$XXL$&wid=513&fit=constr
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAY4AAAK8CAYAAAD4XlhHAAAgAElEQVR4Xsy9B39sWXLcmeU97LM9MxpK33d3JVLk7jdbaSlRnHbPw5a3+/tHnHPvLaAKwOtuSnpkTaGBMtdmnIyMjKz9x//j/91FRNRqNZ4O/6vV4thfdzu9/fG/XX5HLfJLnvyOtA1+zS78uUc++8DX5c+ubs/RbXvw/v3t4vsP7a23R5uX/nzs86ufV7zGR1kP/u7X7H9PPk4886jx0LHPx5/jso3YbaJW20bEVs+12i5221WsVvP49u1zfPr4a/ztx3+Jr98+xXh8Ha12LXr9ZgyG7ej3+zHoD2I0HEU9nfN6va4jwvflk8X3rtfrWC6XMZtNYjqdxGQyjtlsHMvFNNbLWaw3y4jtKuq7Tey2a2/Xbh18WqNei067FYNeN4aDXnRazeg2m9FpNeLsZBhnp8M4PRlFr9OOVrMRUc/nm532xnDsdtttxCY973ZR4xzw+/x/tYh6ox6NRiOarWY0m41o1utRr9e0f+wi+8J/N/S6ejQbjeIcFPtenBNfHPrudB42621sttvYbnne6Vk/b/LzJjbrTaxXnINlrJfLWK9Xeo0+R9c229SIGo+a7wnes9JjWzxvd7VYrbYxW6xitlzFfLmOxXIdt+Np3I1nMZnNY7nZcEhiw4bWG1FvNoP3cXRqtUZEra6ft1v2uxn1RjNqTV7XiEaz6e2o1dmoYj/Yx3zL1fK9y/GuXJScC64/LheeeXDtNZqNaLWaETu+txG7Hfvajna7H6OTizg9u4yz81cxHJ5Frz+KTncYtXorarV21KITsWtG1NjOlrZV26vtSw9fUeysrgtd7+Ht3Wlb/fDV4eMdtW3+Kbw/6aGf+bzqvZeuPd0A3FflvXo8KB4Je8fiYeXlZUzIceDYZxW347HAXOzHS2Pdow/KF3k6gjp2nPeMBw4Kj95WexFw5ONYbGY+6L65ngOO8u9PgFMBHOWNm3560b
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
url
http://images.asos-media.com/products/new-look-lace-hem-sweat-dress/7937055-1-black?$XXL$&wid=513&fit=constrain
http://images.asos-media.com/products/new-look-slogan-sleeve-midi-sweat-dress/7951158-1-pink?$XXL$&wid=513&fit=constrain