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 / dynamo_db_query_example.md
Last active August 29, 2015 13:56 — forked from kenoir/dynamo_db_query_example.md
Playing around with DynamoDB (old)

AWS query-instance_method docs

export AWS_ACCESS_KEY_ID=‘XXXX’
export AWS_SECRET_ACCESS_KEY=‘XXXX’
# ENV['AWS_ACCESS_KEY_ID']
# ENV['AWS_SECRET_ACCESS_KEY']
@Integralist
Integralist / mocking-and-faking.md
Last active August 29, 2015 13:57
Examples of mocking and faking data using PHPUnit

The problem with Faking it

The Problem

Developer (A) creates 2 classes, MyClass and Dependency:

class MyClass
{
    private $dependency;
@Integralist
Integralist / duck typing rspec.rb
Last active August 29, 2015 14:04 — forked from cupakromer/gist:974c6fb9d0d6de3c2a6e
Test "Duck Typing" using RSpec 3's `instance_double`
class Calculator
def reduce(operator)
fail "You shouldn't be calling this directly!"
end
end
def uses_a_duck_type(calculation)
calculation.reduce(:+)
end
@Integralist
Integralist / curry.js
Last active August 29, 2015 14:04 — forked from unscriptable/curry.js
Curry implementation in Node
module.exports = curry;
function curry (f) {
var arity = f.length;
var params = [];
var end = createEnd(f, arity);
return createCurried(params, arity, end);
}
function createEnd (f, arity) {
@Integralist
Integralist / zsh.md
Last active August 29, 2015 14:11 — forked from jcleveley-zz/zsh.md
Zsh tips

Path replacement

Moving from: /www/site1/media/css/main to /www/site2/media/css/main can be a pain, but not in zsh:

cd site1 site2
@Integralist
Integralist / Godofile.go
Last active August 29, 2015 14:28
Godo re-build task
// It's important to realise that you'll only ever want to `go build` or `go run` a single file
// This confused me originally
// I could understand why my task's `Context` didn't get passed the name of the changed file
// The problem was I was just hacking little scripts together
// In practice, you'll be working within a project directory and you'll have a single entry point file
package main
import . "gopkg.in/godo.v1"
@Integralist
Integralist / dabblet.css
Created February 29, 2012 13:51 — forked from chriscoyier/dabblet.css
Checkbox Hack
/* Checkbox Hack */
input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
-webkit-appearance: push-button;
-moz-appearance: button;
@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):

@Integralist
Integralist / LICENSE.txt
Created August 15, 2012 09:36 — forked from sdepold/LICENSE.txt
140byt.es -- addObserverMethods
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Sascha Depold http://depold.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
@Integralist
Integralist / input.scss
Created November 22, 2012 07:55 — forked from kaelig/input.scss
Extending placeholder selectors within media queries
%myclass {
color: blue;
@media (min-width: 600px) {
background: red;
}
@media (min-width: 800px) {
font-size: 28px;
}
}