Skip to content

Instantly share code, notes, and snippets.

View OliverJAsh's full-sized avatar

Oliver Joseph Ash OliverJAsh

View GitHub Profile
@OliverJAsh
OliverJAsh / foo.md
Last active August 29, 2015 13:57
`git stash pop` not merging

If you’re trying to pop a stash and Git won’t merge for you because you have changes in your index to the same file(s) (Git needs to use the index to do a merge at all), i.e.:

❯ gsp
error: Your local changes to the following files would be overwritten by merge:
	index.html
Please, commit your changes or stash them before you can merge.
Aborting
@serby
serby / commit-style-guide.md
Last active August 29, 2015 14:00
Clock Commit Style Guide

Clock Committing Style Guide

To allow us to automatically create a good quality changelog from our git history we recommend the following formats for commit messages.

The aim is to capture a reference to any ticket, card, or story that this commit contributes towards.

Because we are now using the Pivotal Tracker Webhook on some projects we suggest wrapping your commit message prefix with square brackets []

http://pivotallabs.com/level-up-your-development-workflow-with-github-pivotal-tracker/

@tfe
tfe / jquery.truncatelines.js
Created July 21, 2011 01:05 — forked from cscheng/jquery.truncatelines.js
A simple jQuery plugin to truncate a piece of text to a predefined amount of lines. It assumes pixel values of both the container and its line-height. Useful when you have multiple boxes with text in your design that require equal heights.
// https://gist.github.com/1096291
;(function ($) {
$.fn.truncateLines = function(options) {
options = $.extend($.fn.truncateLines.defaults, options);
return this.each(function(index, container) {
container = $(container);
var containerLineHeight = Math.ceil(parseFloat(container.css('line-height')));
@chriseppstein
chriseppstein / 0_usage.scss
Created February 29, 2012 19:29
This is code that runs using Sass 3.2 prerelease and something like this will be in compass soon.
@include keyframes(appear-and-roundify) {
0% { opacity: 0; @include border-radius(2px); }
100% { opacity: 1; @include border-radius(10px); }
}
\documentclass[11pt,a4paper]{article}
% for images.
\usepackage{graphicx}
\usepackage{setspace}
% for code blocks
\usepackage{listings}
% referencing using surname first
\usepackage{natbib}
@ccampbell
ccampbell / mousetrap-pause.js
Created September 19, 2012 03:30
Extends mousetrap.js to add pause/unpause support. Just include this js after mousetrap.
/**
* adds a pause and unpause method to Mousetrap
* this allows you to enable or disable keyboard shortcuts
* without having to reset Mousetrap and rebind everything
*/
Mousetrap = (function(Mousetrap) {
var self = Mousetrap,
_original_stop_callback = self.stopCallback,
enabled = true;
#! /bin/bash
x=`identify -format "%w" $1`
y=`identify -format "%h" $1`
data=`openssl base64 < $1 | tr -d '\n'`
type=`file --mime-type -b $1`
echo "display:block;
font:0/0 a;
color:transparent;
@millermedeiros
millermedeiros / updateLibs.sh
Last active October 11, 2015 12:37
Shell script to update 3rd party libs
#!/bin/sh
# This shell script is used to bootstrap the app and update external libraries
#
# ====== IMPORTANT ======
#
# it may break application if 3rd party libs aren't backwards compatible
# or if libs were edited locally, use with care !!!
@Integralist
Integralist / retina.scss
Created October 18, 2012 14:12
Example of passing a code block to a Mixin to make it more flexible (especially for displaying retina content)
@mixin retina {
/* Target any and all high-density screens on any browser currently known (October 2012) */
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-resolution: 1.5dppx) {
@content;
}
}
(ns whatlang.core
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.set :as sets]
))
(defn load-data
"Read the country data file from the resource. The data has been
mangled in to lines like so: