Skip to content

Instantly share code, notes, and snippets.

View ngsctt's full-sized avatar

Nathan ngsctt

View GitHub Profile
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
//
// This is a hack to fill the gap between 480 and 760 pixels - a missing range
// in the bootstrap responsive grid structure. Use these classes to style pages
// on cellphones when they transition from portrait to landscape.
//
// NOTE: Here I use SASS instead of LESS for styling. To convert to LESS
// replace '$screen' with '@screen' and '$grid' with '@grid'.
//
// See https://github.com/twbs/bootstrap/issues/10203 for more info.
@ngsctt
ngsctt / GeekTool Snippets.md
Last active August 30, 2015 08:22
Snippets of Bash code to use in GeekTool shell widgets

GeekTool Snippets

Bash snippets to use in GeekTool

@ngsctt
ngsctt / CSS3 Timeline.markdown
Created August 16, 2015 08:26
CSS3 Timeline
/*------------------------------------*\
DROPDOWNS
\*------------------------------------*/
// Based on the CSS from this blog post on CSS Wizardry:
// http://csswizardry.com/2011/02/creating-a-pure-css-dropdown-menu/
// Predefine the variables below in order to alter and enable specific features.
$inuit-dropdown-inter-radius: $inuit-btn-radius !default;
$inuit-dropdown-max-width: 250px;
@ngsctt
ngsctt / Favicon list.md
Created January 14, 2016 07:27
Which favicon sizes/files to use for maximum compatiblity

Favicon list

Working out what sizes/formats/filenames to use for favicons is confusing---especially if you're trying to support legacy browsers. There are some great lists out there, but they are often out-of-date or incomplete. So here's a new one:

Normal favicons

Place favicon.ico in root directory---include a 16x16 and 32x32 image. This will be effective for most browsers. Do not add a link to the head---browsers that can use png icons may ignore them in favour of the lower-quality ico if you do. favicon.png as a 32x32 icon for browsers that can handle png.

Touch icons

Icons for use in modern browsers (eg. Safari 8+) and mobile devices.

@ngsctt
ngsctt / export.xml
Created June 21, 2017 14:09 — forked from gmontard/export.xml
Jekyll export to Medium
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/">
<channel>
<title>{{ site.name }}</title>
<link>{{ site.url }}</link>
<description>{{ site.description | xml_escape }}</description>
<pubDate/>
@ngsctt
ngsctt / Hugo email shortcode.md
Last active September 19, 2022 10:38
Shortcode to inject character-escaped emails in Hugo

Without plugins, it's difficult to use obfuscated email addresses in Hugo. Additionally, Hugo will aggressively escape anything you introduce to a template, especially if it's a href attribute.

To use a character entities obfuscation technique (eg. that of http://wbwip.com/wbw/emailencoder.html), place email.html in the layouts/shortcodes folder, and place emails.yml in the data folder.

The contact email in emails.yml is the character entity-encoded form of user@example.com. It will be the default email used if you call the email shortcode (by using {{&lt; email &gt;}} or {{&lt; email contact &gt;}} in your page content) without any parameters. You can add other emails to emails.yml and use them in the email shortcode by passing their key as a parameter, eg: {{&lt; email newKey &gt;}}

@ngsctt
ngsctt / Email obfuscation with character entities.md
Created September 22, 2017 02:29
Using character entities to obfuscate email addresses on websites to prevent scraping, in Hugo

Keybase proof

I hereby claim:

  • I am ngsctt on github.
  • I am nathanscott (https://keybase.io/nathanscott) on keybase.
  • I have a public key ASAQjsej-Kf0IgUTzM6b3NjkVOGr66gdevswYFB_N-_hmwo

To claim this, I am signing this object: