Skip to content

Instantly share code, notes, and snippets.

View brudil's full-sized avatar
🦋
making things better

James Canning brudil

🦋
making things better
View GitHub Profile
@brudil
brudil / fib.js
Last active August 29, 2015 14:01
var fib = function(endNumber){
var currentNumber = 1,
previousNumber = 0,
fibber,
handler,
reallyPreviousNumber = 0,
data = [];
handler = function(value){
data.push(value);
@brudil
brudil / clickOff.js
Created July 23, 2014 12:15
Simple directive to set a flag to false when a user clicks outside of the element.
angular.module('clickOff').directive('clickOff', ['$document', '$timeout',
function($document, $timeout) {
return {
restrict: 'A',
scope: {
clickOff: '='
},
link: function(scope, elem, attr, ctrl) {
elem.bind('click', function(e) {
e.stopPropagation();

Keybase proof

I hereby claim:

  • I am brudil on github.
  • I am brudil (https://keybase.io/brudil) on keybase.
  • I have a public key whose fingerprint is 3691 68BE 096E 66F9 0B97 EFCE 2966 8C36 C69D 747B

To claim this, I am signing this object:

.search-results {
text-align: left;
list-style: none;
margin: 0;
padding: 0;
&__item {
margin: 0 0 20px;
padding: 0;
}
@brudil
brudil / dabblet.css
Created April 13, 2012 15:34
Untitled
div{
width: 300px;
height: 200px;
background-color: green;
}
@brudil
brudil / dabblet.css
Created November 29, 2012 19:33
Untitled
.lft-column {
width: 70%;
float: right;
background: indianred;
}
.rt-column {
width: 30%;
overflow: hidden;/* This does the magic */
@brudil
brudil / active.py
Created June 9, 2013 23:11
Django Navigation 'active' template tag.
from django import template
from django.core.urlresolvers import resolve
register = template.Library()
@register.simple_tag(takes_context=True)
def active(context, url_name):
current_url = context['request'].get_full_path()
if resolve(current_url).url_name == url_name:
return 'active'

Filtering Organisations Proposal

We want to support filtering of multipule attributes for organisations. For example;

Show me things that are:

  • Free
  • Inside

MSL support a listing description. This only shows in the overall organisation list. Parsing is already a requirement, for search - all other MSL based search and filtering doesn't use MSL widgets.

@brudil
brudil / shots.py
Created April 4, 2014 12:40
Hacky script for OS X for taking lots and lots of screenshots. Enter in URLs, takes screenshots of the webpages and the browsers chrome. Chrome not supported.
#!/usr/bin/env python
#Hacky script for OS X for taking lots and lots of screenshots.
#Enter in URLs, takes screenshots of the webpages and the browsers chrome. Chrome not supported.
#Licence: MIT, creator: @brudil
from subprocess import Popen, PIPE, call
import time
import os