Skip to content

Instantly share code, notes, and snippets.


Andreas Brekken abrkn

View GitHub Profile
abrkn / gist:4170859
Created Nov 29, 2012
Offline wallets
View gist:4170859
Version: GnuPG v2.0.17 (MingW32)
taldanzig / osxvpnrouting.markdown
Created Jan 24, 2013
Routing tips for VPNs on OS X
View osxvpnrouting.markdown

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:

simenbrekken / SublimeLinter.sublime-settings
Last active Dec 17, 2015
SublimeLinter configuration
View SublimeLinter.sublime-settings
"jshint_options": {
"browser": true, // This option defines globals exposed by modern browsers: all the way from good ol' document and navigator to the HTML5 FileReader and other new developments in the browser world.
"devel": true, // This option defines globals that are usually used for logging poor-man's debugging: console, alert, etc.
"expr": true, // This option suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls. Most of the time, such code is a typo. However, it is not forbidden by the spec and that's why this warning is optional.
"globals": {
"_": false // I usually include lodash/underscore in all my projects so feel free to remove this
"indent": 4, // This option enforces specific tab width for your code.
"jquery": true, // This option defines globals exposed by the jQuery JavaScript library.
simenbrekken / bank-accounts.css
Last active Dec 18, 2015
State driven Stylus
View bank-accounts.css
.visible-empty {
display: block;
.is-empty .visible-empty,
.has-empty .visible-empty {
display: none;
.is-empty .hidden-empty,
.has-empty .hidden-empty {
display: none;
simenbrekken / plugins.js
Created Jun 25, 2013
Various jQuery convenience plugins
View plugins.js
$.fn.template = function(selector) {
return $(this).find(selector + '[data-template]').removeAttr('data-template').remove()
$.fn.rows = function(columns) {
var children = $(this).children().get()
while (children.length) {
var chunk = children.splice(0, columns)
$(chunk).wrapAll('<div class="row' + (chunk.length % 2 ? ' uneven' : '') + '">')
colingourlay / app.jsx
Created Feb 26, 2014
Using react-router-component to drive the routing of a Cordova app (while still working as a web app).
View app.jsx
function init() {
var HomePage = React.createClass({
render: function() {
return <div>Home</div>;
var NotFoundPage = React.createClass({
render: function() {
simenbrekken / example.js
Last active Aug 29, 2015
Simple RegExp-based Router
View example.js
// "Routes"
function Home() {
function Products(params) {
console.log(params.category, 'products')
function ProductDetails(params) {
simenbrekken / DataManifestMixin.js
Created Mar 21, 2014
React Store + DataManifest Prototype
View DataManifestMixin.js
'use strict';
var rsvp = require('rsvp'),
lodash = require('lodash'),
invariant = require('react/lib/invariant')
function resolve(resource) {
if (resource instanceof rsvp.Promise) {
return resource
} else if (lodash.isArray(resource)) {
stefansundin /
Last active Apr 26, 2021 — forked from 8bitDesigner/
Git post-checkout and post-merge hooks to simplify bundling and other tasks.

Make bundleing and npm installing easy

These git hooks runs bundle or npm install automatically whenever you:

  • git checkout a new branch with a different Gemfile or package.json.
  • git pull a change to Gemfile or package.json.

How to install

  1. cd awesome_git_repo
View actions_referred.js
var Constants = require('../constants')
exports.query = function() {
.then(function(data) {
this.dispatch(Constants.Referred.QUERY_COMPLETED, data)
}.bind(this), function(err) {
this.dispatch(Constants.Referred.QUERY_FAILED, {