Skip to content

Instantly share code, notes, and snippets.

View simonwjackson's full-sized avatar
🎯
Focusing

Simon W. Jackson simonwjackson

🎯
Focusing
View GitHub Profile
@simonwjackson
simonwjackson / gist:3934342
Created October 22, 2012 21:09 — forked from tomraithel/gist:3852171
SASS: mixin for absolute center position
@mixin center($width, $height) {
position: absolute;
left: 50%;
top: 50%;
height: $height;
width: $width;
margin-left: - $width / 2;
margin-top: - $height / 2;
}
@simonwjackson
simonwjackson / example.js
Created October 22, 2012 21:14 — forked from addyosmani/example.js
Javascript: Mediator pattern
// Example 1
mediator.name = 'Doug';
mediator.subscribe('nameChange', function(arg){
console.log(this.name);
this.name = arg;
console.log(this.name);
});
mediator.publish('nameChange', 'Jorn');
@simonwjackson
simonwjackson / gist:5f69309d620dc453d94c
Created May 27, 2014 14:46
gst-plugins-good010 failed to build
~ ❯❯❯ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 335407e58f4d1195f383b4fcee9f77cd180944a4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9.3-x86_64
Xcode: 5.1.1
@simonwjackson
simonwjackson / pa-duckduckgo.user.css
Last active December 22, 2015 03:51
Project Align: duckduckgo
@-moz-document domain("duckduckgo.com") {
/*** Centering *************************************************************/
div.cw:nth-child(4),
#header,
div.zcm:nth-child(4) {
margin-left: auto !important;
margin-right: auto !important;
}
#header,
@simonwjackson
simonwjackson / index.html
Last active February 16, 2017 22:42 — forked from anonymous/index.html
Spatial Navigation with selected element always in view // source http://jsbin.com/mucoses
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>JavaScript SpatialNavigation Demo Page</title>
<script>
function isElementInViewport (el) {
//special bonus for those using jQuery
@simonwjackson
simonwjackson / index.html
Last active February 18, 2017 14:48
Game Packery with left nav // http://jsbin.com/gamafuk
<!DOCTYPE html>
<html>
<head>
<meta content="Game Packery with left nav" name="description">
<meta charset="utf-8">
<meta content="width=device-width" name="viewport">
<title>
JS Bin
</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.3.1/css/bulma.min.css" rel="stylesheet" type="text/css">
@simonwjackson
simonwjackson / surfing.keys.js
Last active September 16, 2019 14:34
Surfing Keys
/*
* Headings: http://www.network-science.de/ascii/ascii.php?x=22&y=4&FONT=small&RICH=no&FORM=left&STRE=no&WIDT=80&TEXT=<YOUR_TEXT_HERE>
* Font: small
*/
/*
const plugins = [{
url: 'https://gist.githubusercontent.com/simonwjackson/56fff7941db54c4afb7ff286b74ec401/raw/reddit.sk.js',
name: 'reddit',
options: {}
// ;(function(options) {
command('reddit', 'reddit list', ([sub]) => {
if (!sub) sub = 'top'
else sub = `r/${sub}`
const subreddit = `https://www.reddit.com/${sub}.json?sort=top&t=day`
function reddit2list(json) {
return json.data.children.map(child => ({
title: child.data.title.trim(),
@simonwjackson
simonwjackson / vimify.js
Last active October 17, 2017 14:44
Vimify
// ==UserScript==
// @name Vimify
// @namespace http://miniarray.com
// @version 0.1
// @description Vimify textarea inputs
// @author You
// @match https://glitch.com/edit/*
// @grant none
// ==/UserScript==
@simonwjackson
simonwjackson / tau-custom.css
Last active October 27, 2017 18:21
Tizen UI
.content-padding {
padding-top: 16px;
padding-bottom: 16px;
padding-left: 30px;
padding-right: 30px;
}
.button-group-height {
height: 72px;
}