Skip to content

Instantly share code, notes, and snippets.

View Snugug's full-sized avatar

Sam Richard Snugug

View GitHub Profile
@Snugug
Snugug / use.scss
Last active August 29, 2015 14:07 — forked from nex3/use.scss
// Imports zip.sass, zip.scss, or zip.css *nontransitively* with a "zip" prefix.
@use "zip";
// Uses the "foo" mixin from zip.
@include zip-foo;
// The prefix is now "zap".
@use "zip" as zap;
// Everything is in the global namespace.
@Snugug
Snugug / SassMeister-input-HTML.html
Created January 13, 2014 21:35 — forked from mietek/SassMeister-input-HTML.html
Generated by SassMeister.com.
<article class="calendar">
<header class="calendar">
<ul class="weekdays">
<li class="weekday mon"><span class="weekday">Mon</span></li>
<li class="weekday tue"><span class="weekday">Tue</span></li>
<li class="weekday wed"><span class="weekday">Wed</span></li>
<li class="weekday thu"><span class="weekday">Thu</span></li>
<li class="weekday fri"><span class="weekday">Fri</span></li>
<li class="weekday sat"><span class="weekday">Sat</span></li>
<li class="weekday sun"><span class="weekday">Sun</span></li>
@Snugug
Snugug / 0_reuse_code.js
Created November 25, 2013 04:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Snugug
Snugug / Lessons.md
Created September 7, 2013 13:32 — forked from phamann/Lessons.md

Lesson's learnt building the Guardian

Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?

Daithi O Crualaoich

  • Work with great people.
  • Deploy like crazy. This means the team has to control the infrastructure as well as code.
  • Design is not a service. Designers have to sit in the team.
  • Infrastructure is intrinsically unreliable. Discard and replace is the robust strategy.
  • Use your CDN for HTML too.
  • Don't always do as you are told.

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

<?php
function swap(array &$array, $k1, $k2) {
$temp = $array[$k1];
$array[$k1] = $array[$k2];
$array[$k2] = $temp;
}
function partition(array &$array, $left, $right, $pivot) {
$pValue = $array[$pivot];
@Snugug
Snugug / perferences.json
Created August 22, 2012 08:38 — forked from soffes/perferences.json
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns": [
".DS_Store",
"dump.rdb"
],
"folder_exclude_patterns": [
".git",
@Snugug
Snugug / trigram.html
Created July 11, 2012 15:35 — forked from tkadlec/trigram.html
Trigram for heaven icon
<html>
<head>
<title>Trigram for heaven icon</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<style type="text/css">
#menu{
position: relative;
}
#menu a{
// Button base
// ------------
%button {
@inlude inline-block;
&:hover {
text-decoration: none;
}
}
@import "compass/css3/box-sizing";
@import "compass/utilities/general/clearfix";
$colwidth: 67px;
$gutterwith: 10px;
$columns: 12;
.column {
@include box-sizing(border-box);
padding: 0 $gutterwith;