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>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script>delete window.fetch;</script>
<script src="https://cdn.rawgit.com/zloirock/core-js/master/client/shim.min.js"></script>
@earnubs
earnubs / Makefile
Last active Oct 4, 2017
node6 sunos node-sass pkg
View Makefile
# $NetBSD$
PORTNAME= node-sass
PORTVERSION= 4.5.3
DISTNAME= v${PORTVERSION}
PKGNAME= node6-sass-binding-${DISTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
CATEGORIES= meta-pkgs
MASTER_SITES= ${MASTER_SITE_GITHUB:=sass/}
USE_TOOLS+= gmake
@earnubs
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) {
mocha.reporters.Base.call(this, runner);
var passes = 0;
var failures = 0;
runner.on('pass', function(test){
passes++;
@earnubs
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
==
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
upload.
@earnubs
earnubs / selenium-webdriver-proxy-browserstack.md
Last active Jan 19, 2017
Browserstack selenium-webdriver within a proxied environment
View selenium-webdriver-proxy-browserstack.md

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
earnubs / squid.conf
Created Jan 13, 2017
squid config jenkaas
View squid.conf
# Allow br0
acl br0 src 192.168.234.140/16
# Allow br1
acl br1 src 172.16.183.160/16
# 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
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
},
View setup.sh
#!/bin/bash
# configure LXD profile for dual nic macOS/vmware fusion set up https://gist.github.com/earnubs/eec3c6aa1e091c0a898c
set -eu
_UID=$(id -u)
GID=$(id -g)
GROUP=$(id -gn)
SUBUID=root:$_UID:1
SUBGID=root:$GID:1