Skip to content

Instantly share code, notes, and snippets.

View loonies's full-sized avatar
👨‍💻
Working full time

loonies

👨‍💻
Working full time
View GitHub Profile
!SESSION 2014-02-19 11:20:29.864 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.ui 4 0 2014-02-19 11:23:05.627
!MESSAGE Unhandled event loop exception
!STACK 0
#!/bin/bash
# Destination: ~/.pomodoro/hooks/work.d/
# Goal: block access to Twitter and Facebook while in a Pomodoro
# Note: won't work if you use Chrome, as it maintains an internal (not flushable from CLI) DNS cache. Fuck it.
# This file must be able to touch "/etc/hosts":
# The best way would be to create a group able to modify the "/etc/hosts" file:
# $ sudo addgroup host-manager
# $ sudo chgrp host-manager /etc/hosts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@loonies
loonies / app-contract.md
Created December 6, 2012 16:58 — forked from lukemorton/app-contract.md
Application contract

Application contract

An application must keep to the following rules if it is to stay sane.

ActionController (POST Controller::action_*())

  • Must call one and only one UseCase
  • Must redirect to ViewController
@loonies
loonies / pubsub.js
Created October 11, 2012 14:23
jQuery pub/sub plugin by Peter Higgins
/*!
* jQuery pub/sub plugin by Peter Higgins
* https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js
*
* Modified by Tobin Bradley
*
* AFL/BSD Licensed
*/
;(function(d){
// the topic/subscription hash
@loonies
loonies / git-cheat-sheet.md
Last active December 22, 2021 16:38
Git Cheat Sheet

Git Cheat Sheet

Although there are enough resources on the web about Git, I will keep this one for my own reference. Minimal Git version required 1.7.2.

TOC

@loonies
loonies / css-ordering-guide.css
Created March 26, 2012 10:22
CSS Properties Ordering Guide
/**
* CSS Properties Ordering Guide
*
* Double line breaks only included to separate certain property types.
* Do not put double line breaks in production code.
*
* Andy Ford - Aloe Studios http://aloestudios.com
*/
/**
* Render notices
*
* Converts a JSON object to the HTML notice
*
* @param json JSON object
* @return string
*/
function notify(data)
{
@loonies
loonies / hierarchy.php
Created November 20, 2011 21:39 — forked from devi/hierarchy.php
MySQL "Closure Table" for Kohana based on Bill Karwin design.
<?php defined('SYSPATH') or die('No direct script access.');
/**
* MySQL "Closure Table" for Kohana based on Bill Karwin design.
*
* @link http://www.slideshare.net/billkarwin/models-for-hierarchical-data
* @TODO improve
*
* sql schema:
* CREATE TABLE `closures` (
* `id` int(11) NOT NULL AUTO_INCREMENT,