Skip to content

Instantly share code, notes, and snippets.

View lsjroberts's full-sized avatar

Laurence Roberts lsjroberts

View GitHub Profile
@lsjroberts
lsjroberts / .gitignore
Last active August 29, 2015 13:56
Pimple Test
/vendor
@lsjroberts
lsjroberts / github-templates.js
Last active August 29, 2015 14:00
Templates for github pull requests and issues
javascript:(
function() {
var e=document.getElementById('pull_request_body');
if (e) {
e.value += '#### What does this do?\n\n';
e.value += '#### How should this be manually tested?\n\n';
e.value += '#### Related PRs / Issues / Resources?\n\n';
e.value += '#### Anything else to add? (Screenshots, background context, etc)\n\n';
}
}
@lsjroberts
lsjroberts / keybase.md
Created January 19, 2015 11:16
keybase.md

Keybase proof

I hereby claim:

  • I am lsjroberts on github.
  • I am lsjroberts (https://keybase.io/lsjroberts) on keybase.
  • I have a public key whose fingerprint is EF95 5587 0E88 0044 FC4C 0690 2B11 CC51 EA87 8ECA

To claim this, I am signing this object:

@lsjroberts
lsjroberts / pr.sh
Created September 5, 2013 22:25
Create pull request on existing issue from HEAD
issue= head=HEAD base=master
while getopts i:h:b: opt; do
case $opt in
i)
issue=$OPTARG
;;
h)
head=$OPTARG
;;
@lsjroberts
lsjroberts / branch.sh
Last active December 23, 2015 04:18
Git directory commands
clear
dir=$(pwd)
for i in `find $dir -type d -maxdepth 1`; do
if [ $i != $dir ]
then
echo "\n\033[33mChecking $i\033[0m"
cd $i
git branch -v --no-abbrev | grep '*'
cd ../
fi
@lsjroberts
lsjroberts / test.php
Last active December 26, 2015 03:09
PHP __toString() bubble test
<?php
class Foo {
public $bar;
public function __construct()
{
$this->bar = new Bar;
}
@lsjroberts
lsjroberts / hover-diamonds.htm
Created October 23, 2013 19:32
gelatindesign.co.uk redesign ideas
<!DOCTYPE html>
<html>
<head>
<style>
.diamonds {
padding: 100px;
}
.diamond {
float: left;
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
fontFamily: '"Meslo LG M DZ", "Fira Sans Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@lsjroberts
lsjroberts / route-helpers.js
Last active July 26, 2017 09:58
Dynamic loading helpers for React Router
const loadRoute = (next) =>
(module) =>
next(null, module.default);
const loadRoutes = (next) =>
(modules) =>
next(null, modules.map(module => module.default));
const loadRouteComponent = (importer) =>
(location, next) =>
@lsjroberts
lsjroberts / gulpfile.js
Last active April 9, 2021 07:54
Gulp styles & scripts build and watcher
/**
* Install:
* $ npm install gulp gulp-minify-css gulp-autoprefixer gulp-ruby-sass gulp-coffee gulp-uglify gulp-concat gulp-rimraf gulp-notify
*/
var gulp = require('gulp');
// styles
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');