Skip to content

Instantly share code, notes, and snippets.

View .vimrc
set expandtab
set shiftwidth=2
set softtabstop=2
set nu
set path+=**
set clipboard=unnamed
set wildignore+=.git,.DS_Store
set statusline+=%F
set backspace=indent,eol,start
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script>delete window.fetch;</script>
<script src=""></script>
earnubs / Makefile
Last active Oct 4, 2017
node6 sunos node-sass pkg
View Makefile
# $NetBSD$
PORTNAME= node-sass
PKGNAME= node6-sass-binding-${DISTNAME}
CATEGORIES= meta-pkgs
USE_TOOLS+= gmake
earnubs / simple-mocha-reporter.js
Created Mar 31, 2017
mocha reporter without the solarized colour mayhem
View simple-mocha-reporter.js
var mocha = require('mocha');
module.exports = MyReporter;
function MyReporter(runner) {, runner);
var passes = 0;
var failures = 0;
runner.on('pass', function(test){
earnubs / index.js
Created Feb 10, 2017
HMR with reach-hot-loader3 and webpack 2
View index.js
import { AppContainer } from 'react-hot-loader';
import React from 'react';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import { render } from 'react-dom';
import App from './containers/app';
import reducers from './reducers';
// Grab the state from a global variable injected into the server-generated HTML
View ols-vms.txt
vila@saw:~/u1/ols-vms/exp/doc 0 :) $ ./ols-vms2 help
Available Topics:
vm.setup_scripts: A list of scripts to be executed on the guest to finalize the setup.
The scripts are executed over ssh, in the user home directory.
Scripts can use config options from their vm, they will be expanded before
earnubs /
Last active Jan 19, 2017
Browserstack selenium-webdriver within a proxied environment

If you are running selenium-webdriver within an environment that requires an HTTPS proxy to connect to the outside world in order to drive your tests, such as when using the Browserstack webdriver hub, then you may need to configure a webdriver proxy with an HTTP CONNECT tunnelling httpAgent, like so:

import { Builder } from 'selenium-webdriver';
import { httpsOverHttp } from 'tunnel-agent';
import url from 'url';

# other stuff ...
const proxyUrl = url.parse(process.env.HTTP_PROXY);
earnubs / squid.conf
Created Jan 13, 2017
squid config jenkaas
View squid.conf
# Allow br0
acl br0 src
# Allow br1
acl br1 src
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
earnubs / dev.js
Last active Nov 16, 2016
custom webpack logger (talisker)
View dev.js
webpackApp.use(webpackDevMiddleware(compiler, {
contentBase: webpackDevUrl.href,
quiet: false,
hot: true,
noInfo: false,
stats: {
colors: false,
chunks: false,
children: false
# configure LXD profile for dual nic macOS/vmware fusion set up
set -eu
_UID=$(id -u)
GID=$(id -g)
GROUP=$(id -gn)