Skip to content

Instantly share code, notes, and snippets.

View caycefischer's full-sized avatar

Cayce caycefischer

  • Toronto
View GitHub Profile
@Phlow
Phlow / for-loop-sorted-collection
Last active April 30, 2024 13:30
This Liquid loop for Jekyll sorts a collection by date in reverse order
{% comment %}
*
* This loop loops through a collection called `collection_name`
* and sorts it by the front matter variable `date` and than filters
* the collection with `reverse` in reverse order
*
* To make it work you first have to assign the data to a new string
* called `sorted`.
*
{% endcomment %}
defaults write jp.informationarchitects.WriterForMacOSX nightMode -bool true
.module {
some: stuff;
&__child {
blah: blah;
}
&--modifier {
modify: me;
}
}
@maban
maban / Maban Website Contract.md
Last active May 18, 2024 02:21
My boilerplate contract

Website Contract [month] [year]

Description of this Contract

This contract is not meant to trick or deceive you; the intention is purely to protect both parties. I have tried to keep the wording as plain as possible, but if anything is unclear, please let me know and I will be more than happy to clarify it with you. Also, until you sign it, please feel free to request to change bits of it to suit your requirements.

In short, [client name] is contracting me, [my name], to [description of my role] between [start date and finish date].

By signing this, you are confirming that you have the power and ability to enter into this contract on behalf of [client's company].

@grayghostvisuals
grayghostvisuals / rwd-please.md
Last active December 19, 2015 18:38
RWD is where it's at. An ongoing list to help solidify the absolute need to have our content as the seed and fluid layouts as our soil. Includes articles, links and tools all centered around RWD.
@isGabe
isGabe / GrunticonSetup.markdown
Last active December 17, 2015 23:49
Grunticon Setup

Basic Grunticon Setup for CLI Idiots Like Me

I hacked and cursed my way to this point...better write it down!

  1. Install node.js: http://nodejs.org/
  2. Install grunt.js: http://gruntjs.com/getting-started
  3. In the Terminal: $ cd [directory]
  4. Either create package.json and use data in this gist's package.json, or run $ npm init and folow the steps
  5. Make sure to add "grunt": "latest" in devDependencies if you use npm-init to create the package.jason file
  6. Install Grunticon in the project: $ npm install --save-dev grunt-grunticon
  7. Create Gruntfile.js and use data from the Gruntfile.js in this gist. Tweak grunticon file paths as needed.
@codepo8
codepo8 / canvas-helper-tools.js
Last active December 17, 2015 15:29
Two handy helper routines for canvas work
// Get the canvas and the context
var c = document.querySelector('canvas');
var cx = c.getContext('2d');
// pixelcolour returns an object of rgba for the pixel at x and y
// great for checking if you are in a certain boundary or for
// colourpickers
function pixelcolour(x, y) {
var pixels = cx.getImageData(0, 0, c.width, c.height);
var index = ((y * (pixels.width * 4)) + (x * 4));
@ddemaree
ddemaree / _retina.scss
Created April 26, 2013 20:49
Example Sass mixin for a "bulletproof" Hi-DPI media query
@mixin retina($ratio: 1.5) {
$dpi: $ratio * 96;
$opera-ratio: $ratio * 100;
@media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}),
only screen and ( -o-min-device-pixel-ratio: '#{$opera-ratio}/100'),
only screen and ( min-resolution: #{$dpi}dpi),
only screen and ( min-resolution: #{$ratio}dppx) {
@content;
}
@arielsalminen
arielsalminen / nav.html
Last active December 14, 2015 12:18
Simple responsive navigation toggle script without library dependencies and with touch screen support (349 bytes minified and gzipped). Live demo: http://codepen.io/viljamis/full/gAatl
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>Nav toggle</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<ol id="nav" class="closed">
<li class="active"><a href="#">Home</a></li>
@daneden
daneden / webhook.php
Last active December 12, 2015 07:18
Here’s the (somewhat stripped down/censored) script I’m using to deploy my sites. My old method had a script *per repo* inside the directory and added to `.gitignore`. Not a very maintainable or elegant solution. This way, I just hit an address with a query string. Obviously, the repo needs to be owned by the user that the web server is running …
<?php
/*
Usage: http://example.com/webhook.php?repo=repo-name
Obviously, for security, a different file name (or at least a different query string variable name) should be used.
*/
$path = null;