Skip to content

Instantly share code, notes, and snippets.

View thenathanjones's full-sized avatar

Nathan Jones thenathanjones

  • Envato
  • Perth, Australia
View GitHub Profile
@thenathanjones
thenathanjones / designTokens.css
Created June 1, 2023 02:46
Design Token Palooza
:root {
--spacing-xl: 64px;
--spacing-large: 48px;
--spacing-base: 24px;
--spacing-small: 16px;
--spacing-tiny: 8px;
--spacing-micro: 4px;
--spacing-none: 0;
--break-xl: 1199x;
### Keybase proof
I hereby claim:
* I am thenathanjones on github.
* I am thenathanjones (https://keybase.io/thenathanjones) on keybase.
* I have a public key ASDWqhDykhCLEmmD8K2RkcDry0grb-pPD5eFC1AtNzxbeQo
To claim this, I am signing this object:
@thenathanjones
thenathanjones / insertSSI.sh
Last active March 10, 2021 13:12
Simple templating script for inserting SSI tags back in the minified HTML
#!/bin/bash
ssiFile=infra/ssi.txt
indexFile=build/index.html
tempDirectory=tmp
tempFile=$tempDirectory/index.html
mkdir -p $tempDirectory
awk 'NR==FNR{rep=(NR>1?rep RS:"") $0; next} {gsub("<ssi/>",rep)}1' $ssiFile $indexFile > $tempFile && mv $tempFile $indexFile
###
# Compass
###
# Susy grids in Compass
# First: gem install susy
# require 'susy'
@thenathanjones
thenathanjones / gist:2028259
Created March 13, 2012 11:33
C# Implementation
public class Class1
{
public static void Main(string[] args)
{
var buyTransactions = (new int[200000]).Select(b => new BuyTransaction());
var sellTransactions = (new int[400000]).Select(b => new SellTransaction());
var transactions = buyTransactions.Concat<ITransaction>(sellTransactions);
var startTime = DateTime.Now;
param($URI, $Username, $Password)
function Test-FTP {
param($URI, $Username, $Password)
if (!$URI -or !$Username -or !$Password) {
throw "URI, Username and Password are all required"
}
$Error.Clear()
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web.Mvc;
namespace TECCWAMembership.Models
{
public class MembershipForm