Skip to content

Instantly share code, notes, and snippets.

View mintuz's full-sized avatar
🎯
Focusing

Adam Bulmer mintuz

🎯
Focusing
View GitHub Profile
@cowboy
cowboy / HEY-YOU.md
Last active May 16, 2024 13:31
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@jmather
jmather / DICService.php
Created October 9, 2012 02:59
Pimple singleton
<?php
class DICService {
/**
* @var \Pimple
*/
static $container = null;
public static function getContainer()
{
@svallory
svallory / _sass_importers_importonce.rb
Last active December 11, 2015 05:08
Sass custom importer which only imports the same file once, Compass required config and patch.
##
# the ImportOnce importer itself
# colorize is used for colorized terminal output, useful for debugging, but you can strip that off
##
require 'colorize'
module Sass
module Importers
class ImportOnce < Filesystem
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@benhowdle89
benhowdle89 / gist:6975823
Created October 14, 2013 13:43
Displays all images on a page on sites like http://bukk.it for example. Run in console or make a Bookmarklet.
var a=document.links;i=0;for(l=a.length;i<l;i++){var b=new Image;b.src=a[i].href;a[i].insertBefore(b)};
@benhowdle89
benhowdle89 / gist:7083705
Created October 21, 2013 13:15
How http://healthcare.gov checks if the device is mobile...
// checks screen size
var isMobile = {
any: function() {
return($(window).width()<=599);
// nexus7 width is 600 (window.innerWidth)
// this will not run any reformatting for the phone layout on nexus
}
};
@JamieMason
JamieMason / unfollow.js.md
Last active June 6, 2024 14:23
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//