Skip to content

Instantly share code, notes, and snippets.

View arnarthor's full-sized avatar

Arnar Þór Sveinsson arnarthor

View GitHub Profile
// server.js
function sendHtml(req, res) {
const data = {
request: {
id: req.id,
},
me: req.player
};
/**
* Put this in your env (or something similar)
* ELASTICSEARCH_TOPICS_URL=elasticsearch://localhost:9300,localhost2:9300
*/
/**
* This is all I need to do to connect using the elasticsearch protocol.
*/
def apply(esHosts: String, clusterName: String): ElasticClient = {
addFlight(flight) {
// If we are home
if(flight.stateData === 'homeDest'){
return;
}
let flights = _.clone(this.state.flights);
let lastFlight;
// If we got a succesfull new flight
curl -X POST http://127.0.0.1:9200/kodemon/execution/_mapping?pretty=true -d '
{
"execution": {
"properties": {
"key": {
"type": "string",
"index": "not_analyzed"
},
"token": {
"type": "string",
@arnarthor
arnarthor / keybase.md
Created August 29, 2014 12:04
keybase.md

Keybase proof

I hereby claim:

  • I am arnarthor on github.
  • I am arnarthor (https://keybase.io/arnarthor) on keybase.
  • I have a public key whose fingerprint is 9BC2 6961 B8AE 2489 5F8C 1C6A 2505 5052 5E94 8E3C

To claim this, I am signing this object:

@arnarthor
arnarthor / Latex
Last active December 23, 2015 06:49
% A basic LaTeX document for a handin with a
% standard RU title page
% If you want the title to appear on a separate
% page, change notitlepage to titlepage
\documentclass[11pt,a4paper,notitlepage]{amsart}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% If your hand-in is in icelandic change english to icelandic
% Note: This has nothing to do with Icelandic characters, they