Skip to content

Instantly share code, notes, and snippets.

View Integralist's full-sized avatar
🎯
Making an impact

Mark McDonnell Integralist

🎯
Making an impact
View GitHub Profile
@Integralist
Integralist / 1. API.rb
Last active August 29, 2015 14:03
Ruby OOP vs FP (examples are from ThoughtBot's Weekly Iteration -> you should subscribe!)
# Examples taken from ThoughtBot's Weekly Iteration
# We need to implement a solution that allows us to cleanly use two separate APIs
# Our fake APIs
PayPal.charge!(auth_code, 25)
Stripe::CreditCard.new(credit_card_token).charge(25)
@Integralist
Integralist / Process for rebasing Pull Request.md
Last active August 29, 2015 14:05
Process for rebasing Pull Request
  1. On the PR branch
  2. git rebase -i master (i.e. git rebase -i {parent_commit_of_first_commit_in_PR})
  3. Change top commit (the oldest) to reword
  4. Change all other commits to fixup
  5. In commit message (line 1) change title to reflect entire PR
  6. In commit message (line 2) add Closes #n and/or Fixes #n
  7. In commit message (line 3) add Authors: @integralist
  8. git checkout master
  9. git merge {PR_branch} or git cherry-pick {new_rebased_commit}
  10. git branch -D {PR_branch}
@GarrettS
GarrettS / gist:1189225
Created September 2, 2011 17:26
toHexString = function (r, g, b)
var toHexString = function (r, g, b) {
return (toHexString = _toHexString)(r,g,b);
function _toHexString(r, g, b) {
return "#" + toHexByte(r) + toHexByte(g) + toHexByte(b);
}
function toHexByte(bite) {
var hex = bite.toString(16);
return (hex.length === 2 ? hex : "0" + hex);
}
};
@mathiasbynens
mathiasbynens / jsfiddle-defaults.user.js
Created September 8, 2011 12:25
Userscript that enables sensible defaults for jsFiddle.
// ==UserScript==
// @name Sensible defaults for jsFiddle.
// @author Mathias Bynens <http://mathiasbynens.be/>
// @link http://mths.be/bde
// @match http://jsfiddle.net/*
// ==/UserScript==
// Ignore existing fiddles
if (window.location.pathname == '/') {
@louisremi
louisremi / LICENSE.txt
Created October 27, 2011 09:12 — forked from 140bytes/LICENSE.txt
c, an expressive className manipulation lib: c( elem, 'has/add/remove/toggle', class_name )
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 @louis_remi <http://louisremi.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tkissing
tkissing / LICENSE.txt
Created November 7, 2011 04:26 — forked from 140bytes/LICENSE.txt
JavaScript Luhn Checksum 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Timo Kissing http://kissing.name
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@padolsey
padolsey / cat.js
Created December 4, 2011 19:00
Improving Jeremy Keith's CAT news example from http://24ways.org/2011/conditional-loading-for-responsive-designs
var cat = {};
/**
* cat.NewsBox
* Retrieves news from Google
*/
cat.NewsBox = (function(){
function NewsBox(searchTerm, injectFn) {
this.searchTerm = searchTerm;
@Integralist
Integralist / Dimensions.md
Created December 28, 2011 23:30
Determining the dimensions of elements (from MDN)
@Integralist
Integralist / Git Workflow.md
Created March 27, 2012 08:57
Git Workflow using an organisation account with Private repositories

#Overview - setting up our git workflow This set-up works for our team as we don't mind pushing directly to a development branch, but this wouldn't work for other companies as the development branch could potentially get broken fairly quickly and with multiple developers working on this singular branch would be awkward to locate issues and fix - but for a small team this seems to work fine.

##Initial User Set-Up The first developer to work on the new project will go through this process:

  • <github>
    Create repository on GitHub company account

  • ``

@Integralist
Integralist / README.md
Created March 27, 2012 08:58 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

Object-Oriented CSS

Below is how I am currently structuring my CSS to be more object-oriented (with a little assistence from Sass):