Skip to content

Instantly share code, notes, and snippets.

agray /
Created Sep 17, 2015
Setup a newly created BitBucket repository locally with content and a master branch ready to go
#!/usr/bin/env bash
mkdir $1
cd $1
git init
git remote add origin https://$$2/$1.git
echo "Andrew Gray" >> contributors.txt
git add contributors.txt
git commit -m 'Initial commit with contributors'
git push -u origin master
agray / printDirective.js
Created Feb 27, 2015
A working angularJS print directive
View printDirective.js
(function (angular) {
"use strict";
function printDirective() {
var printSection = document.getElementById("printSection");
function printElement(elem) {
// clones the element you want to print
var domClone = elem.cloneNode(true);
if (!printSection) {
printSection = document.createElement("div");
agray / imagemetrouiaccordion
Created Jul 31, 2013
image in metroui accordion
View imagemetrouiaccordion
<a href="#">Product Suites</a>
<div class="preScrollable Homepage div-ss-background-img">
<h2>Standard Edition Suite 4.0</h2>
All the Standard Edition products offered as a bundle<br/><br/>
<button type="button" class="bg-color-maroon" onclick="'')">
<font color="white">Purchase</font>
</button><b>Enterprise Suite coming soon!</b>
You can’t perform that action at this time.