Skip to content

Instantly share code, notes, and snippets.

@cole007
cole007 / Sample
Created July 7, 2014 14:34
Checkboxify
<p>Requires association between for/id pairs</p>
<p>
<label for="checkbox1">Checkbox 1</label>
<input name="checkbox1" id="checkbox1" type="checkbox" checked value="Box"/>
</p>
<p>
<label for="checkbox2">Checkbox 2</label>
<input name="checkbox2[]" id="checkbox2" type="checkbox" checked value="Square"/>
Our country confuses the needs of the many with the wants of the few. Thirty years of neo-liberal policy has put us all in the pockets of the banks, enslaved by the manacles of mortgages, big debt and a media that constantly tells us what we deserve.
We eschew public services, universal healthcare and education to keep taxes low and the business machine oiled, a machine that makes the rich richer and the poor poorer.
Ours is a democracy and a democracy that we have sold to the world as the correct way to do things. We go to war in the name of democracy and protecting our liberties. But we have to ask ourselves what are the values and liberties that we are trying to uphold when our own civil liberties are compromised in the name of 'protecting' our citizens.
What right does an elected body have to make these decisions without due process. The institutions and diligence that have been set up to protect us. All of us. Legislation must go through the proper process.
You work for us.
Dear …,
I am writing in disgust at the news of emergency legislation being 'rushed through' without due diligence and democratic, political process.
As my representative in Parliament I write to request that you seek this legislation be considered in the correct manner with proper consultation and debate amongst the elected representatives of this country.
Rushing through emergency legislation in a week without a proper debate in parliament fundamentally undermines our democratic process and we have to ask ourselves if we undermine our civil liberties to protect our citizens what are the values we are trying to defend and uphold with this new legislation?
Concerned,
@cole007
cole007 / jquery.customSelect.js
Last active August 29, 2015 14:03
Custom select
// fork of library at http://adam.co/lab/jquery/customselect/
// removes width calculations
/*!
* jquery.customSelect() - v0.5.1
* http://adam.co/lab/jquery/customselect/
* 2014-03-19
*
* Copyright 2013 Adam Coulombe
* @license http://www.opensource.org/licenses/mit-license.html MIT License
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="booking-item booking-item--left booking-item--full">
@cole007
cole007 / footer.JS
Created August 26, 2014 09:12
From footer template
@cole007
cole007 / dobanners.js
Last active August 29, 2015 14:05
Do Banners polyfill
doBanners: function() {
var banners = $('.banners-wrapper');
banners.after('<div class="banner-nav-wrapper"></div>');
$('.banner-nav-wrapper').append('<ul class="banner-switch"></ul>')
.append('<ul class="banner-nav"></ul>');
banners.find('.item').each(function(i) {
$(this).addClass('banner-panel-'+i);
var url = $(this).find('.more a').attr('href');
if (i == 0) $(this).addClass('active');
var navImg = $(this).find('.do-image').data('nav');
if(viewportwidth > 1183 && !$('.page').hasClass('home') ){
$('a.icon--search').on('click touchend',function(e) {
e.preventDefault();
$(this).toggleClass('nav-active');
$(this).next('.search__form').toggleClass('search__form--active');
$('.header__secondary-menu').fadeToggle();
});
$('.search__form').css('top','5.45em');
} else {
$('a.icon--search').on('click touchend',function(e) {
@cole007
cole007 / gist:54874745ec4178ca64c6
Created November 24, 2014 13:43
Capitalism quote, Che Guevara
"In capitalist system people live in an invisible cage, for example, they accept the myth of the self-made man, but they do not understand that opportunities for majority are determined by the forces completely beyond individual control"
From Che, Part One
http://www.imdb.com/title/tt0892255/
@cole007
cole007 / BEM rhyme
Created December 2, 2014 12:37
BEM rhyme for @kaelifa :D
Block is a house that is nice and square,
Element is a room with its walls all bare,
Modifier is the wallpaper, hang with care!
.house
.house__room
.house__room—-paisley