Skip to content

Instantly share code, notes, and snippets.

View piersadrian's full-sized avatar

Piers Mainwaring piersadrian

View GitHub Profile
### Keybase proof
I hereby claim:
* I am piersadrian on github.
* I am piersadrian (https://keybase.io/piersadrian) on keybase.
* I have a public key ASCoeLCUgnYQJT_mGy0DwhKdgcKXx-CEMQNYBLgMtGdosQo
To claim this, I am signing this object:
@piersadrian
piersadrian / Appear.in
Created June 22, 2018 18:02
/Appear.in.app/Contents/MacOS/Appear.in
#!/bin/bash
# 1: create new Space in Mission Control for Desktop 2
# 2: create application structure and remember to chmod +x this file
# 3: fully configure browser and webapp
# 4: set "Options -> Assign to Desktop on Display 2"
skel_dir="$HOME/.chrome-user-data-appear-in"
tmp_dir="/tmp"
{
"extends": [
"plugin:lodash/recommended",
"plugin:react/recommended",
"react-app"
],
"plugins": [
"import",
"flowtype",
"jsx-a11y",
@piersadrian
piersadrian / tab-completion.coffee
Created May 8, 2015 17:26
Atom autocomplete suggestions on tab
{Point} = require 'atom'
atom.commands.add 'atom-text-editor', 'custom:tabcomplete', (e) ->
editor = atom.workspace.getActiveTextEditor()
cursor = editor.getLastCursor()
{row, column} = cursor.getBufferPosition()
precedingCharacter = editor.getTextInBufferRange([[row, column - 1], [row, column]])
if /\S/.test(precedingCharacter)
@import "ui-variables";
@import "syntax-variables";
@line-background-color: #f2faff;
.editor:not(.mini) {
width: 1100px;
margin: 40px auto;
.gutter {
'use strict';
var BaseCtrl, ConditionEditCtrl, ConditionsListCtrl, EditCtrl, app,
__slice = [].slice,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
app = angular.module('ngContentApp');
BaseCtrl = (function() {
'use strict'
app = angular.module('ngContentApp')
class BaseCtrl
@$inject: ['$scope', '$location', '$route']
constructor: (dependencies...) ->
# Construct a map of injected dependencies.
deps = {}
@piersadrian
piersadrian / Gruntfile.js
Last active August 29, 2015 13:56
Gruntfile with coffeescript, rails proxy, and jade
// Generated on 2014-02-26 using generator-angular 0.7.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@piersadrian
piersadrian / index.jade
Created February 26, 2014 19:04
yeoman, bower, h5bp, angular-compatible index.jade
doctype html
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
title
meta(name='description', content='')