Skip to content

Instantly share code, notes, and snippets.

View melanierichards's full-sized avatar

Melanie Richards melanierichards

View GitHub Profile
@adamgiese
adamgiese / nth-child-quantity-mixins.scss
Last active April 19, 2023 11:22
Advanced nth-child mixins
@mixin valid-quantity($quantity) {
@if type-of($quantity) != 'number' {
@error 'The "quantity" parameter must be a number!';
}
@if not(unitless($quantity)) {
@error 'The "quantity" parameter must not have a unit!';
}
@if $quantity < 0 {
@error 'The "quantity" parameter must be at least 0!';
}
@AmeliaBR
AmeliaBR / veggies.md
Last active April 26, 2017 05:02
Vegetable Gardening for Beginners

Vegetable Gardening for Beginners

A friend who has lived in apartment buildings almost all her life has finally secured herself a community garden plot. She asked for advice. I wrote out a long list, and figured others might find it useful, too.

The specific dates are aimed at Toronto, Ontario. ("Now" is late April.) But the general advice and plant recommendations apply for anyone in temperate climates. I've gardened in Ottawa, Vancouver, and Edmonton. That's Canadian zones 5a, 8a, and 3b.

@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@joshhartman
joshhartman / gist:2271523
Created April 1, 2012 04:54
Yahoo! Weather API Example Using SimpleXML in PHP
<?php
if(isset($_POST['zipcode']) && is_numeric($_POST['zipcode'])){
$zipcode = $_POST['zipcode'];
}else{
$zipcode = '50644';
}
$result = file_get_contents('http://weather.yahooapis.com/forecastrss?p=' . $zipcode . '&u=f');
$xml = simplexml_load_string($result);
//echo htmlspecialchars($result, ENT_QUOTES, 'UTF-8');
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active January 23, 2024 02:28
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents

@jswartwood
jswartwood / Run in LOCAL terminal...
Created February 19, 2012 01:53
Automatic Git deploys on Dreamhost
# Replace any brackets with real values
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal
ssh [user]@[host]
cd ~
mkdir [mydomain_com].git
cd [mydomain_com].git
git init --bare
vi hooks/post-receive
# Enter the code from the "post-receive" file (in this gist); save + quit
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/