Skip to content

Instantly share code, notes, and snippets.

Rune runeh

  • Oslo
Block or report user

Report or block runeh

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 jsbin.rasib.css
details {
border: solid thin black;
border-radius: 4px;
}
details[open] summary {
border-bottom: solid thin black;
}
View gist:adf43f2601cef4c86457
// launch.js
var traceur = require('traceur');
traceur.require('site.js');
// site.js
var express = require('express');
var app = express();
app.get('/', (req, res) => res.send(getSalutation(req.query.name)));
View fetch a bunch of ads with bacon
var fs = require("fs");
var Bacon = require("baconjs");
var lifestyle = require("lifestyle");
var root = "https://api.finn.no/iad/"
var adListPath = "adids.txt";
var client = new lifestyle.FinnClient(root);
function fetchAd(id) {
View gist:9c57dd997a46f0953c8a
const request = require('request-promise');
const highland = require('highland');
const promiseToStream = highland;
const arrayToStream = highland;
const pollerToStream = highland;
function seenRecently(timeGetter, mostRecentTime=0) {
return (e) => {
let then = timeGetter(e).getTime();
View cow.js
"use strict";
var highland = require("highland");
var request = require("request-promise");
var promiseToStream = highland;
var arrayToStream = highland;
var pollerToStream = highland;
function cowPageGenerator(url) {
var page = 1;
View cowsaycow.js
"use strict";
var highland = require("highland");
var request = require("request-promise");
var cowsay = require("cowsay");
var promiseToStream = highland;
var arrayToStream = highland;
var pollerToStream = highland;
function cowPageGenerator(url) {
View cowstream.js
const highland = require('highland');
const request = require('request-promise')
const promiseToStream = highland;
const arrayToStream = highland;
const pollerToStream = highland;
function cowPageGenerator(url) {
let page = 1;
return (push, next) => {
push(null, request(url, {qs: {page: page++}}));
View missing_modules.py
"""Ban some modules from being importable inside the context
For example:
with missing_modules("sys"):
try:
import sys
except ImportError:
print "sys not found"
View gist:262455
equal(alert, {foo: 1, bar: 2}, "Function is not a dict")
1. Function is not a dict, expected: {
"foo": 1,
"bar": 2
} result: function alert(){
[code]
}
View h2o_http2_proxy.yaml
listen:
port: 443
ssl:
certificate-file: /tmp/h2o/localhost.crt
key-file: /tmp/h2o/localhost.key
hosts:
"localhost":
paths:
"/":
You can’t perform that action at this time.