Skip to content

Instantly share code, notes, and snippets.

View jnowland's full-sized avatar

James Nowland jnowland

View GitHub Profile
@jnowland
jnowland / preferences.sublime-settings
Created October 19, 2014 23:35
Sublime Text 2 Preferences
{
"bold_folder_labels": true,
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
# Ask for the administrator password upfront
sudo -v
# mkdir -p ~/Sites/Work/Clients
# mkdir -p ~/Sites/Work/Internal
# mkdir -p ~/Sites/Personal
# mkdir -p ~/Downloads/Torrents
mkdir -p /Volumes/Sites/Work/Clients
mkdir -p /Volumes/Sites/Work/Internal
@jnowland
jnowland / 0_reuse_code.js
Last active August 29, 2015 14:27
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
@jnowland
jnowland / MetaDataTags.html
Last active August 29, 2015 14:27
Credit Card Gist
<title>{% if this.['Page Title'] != "" -%}{{ this.['Page Title'] }}{% else -%}{{ name }}{% endif -%}</title>
<meta name="description" content="{% if this.['Meta Description'] != "" -%}{{ this.['Meta Description'] }}{% else -%}{{ description | strip_html | replace: "\n", " " | truncate:155 | lstrip | rstrip }}{% endif -%}">
{% if this.['Image Alt Tag'] != "" -%}{% assign imgAlt = this.['Image Alt Tag'] -%}{% else -%}{% assign imgAlt = name -%}{% endif -%}
{{ imgAlt }}
@jnowland
jnowland / svg-logo.scss
Created November 19, 2012 03:23
Logo mixin to include fallback SVG
// Currently an idea, yet to test this snippet.
@mixin logo( $logo-name) {
$image: "#{$logo-name}.png";
.logo {
background-repeat:no-repeat;
display:block;
overflow:hidden;
@jnowland
jnowland / config.rb
Created December 7, 2012 10:48
Config file for working with html and css which can export into a wordpress theme when that phase of the development cycle hits.
#environment = :production
environment = :development
# Set this to the root of your project when deployed.
# Work from file directory "code" for your statics, when the css is ready to go into the wordpress theme switch it over to development
if environment == :production
output_style = :expanded
http_path = "/"
css_dir = "deploy"
@jnowland
jnowland / IE9.md
Last active November 4, 2015 04:03
Browser Upgrades + CSS Benefits

If your min browser support goes to IE9

  • Border Radius
  • SVG
  • Calc()
  • All CSS3 Attributes
  • Box Shadows
  • Basic Viewport units
  • No Javascript hacks
  • jQuery 2
//Please note this does not currently work.
@each $section in council, household, business {
.#{$section} h2 {
//Step 1: I want this below varible to dynamically change to $council-light, $household-light, $business-light
color: $#{$section}-light; //this seems to be the problem of trying to append '-light' onto a varible name
//please note council-light, household-light, business-light are all predefined varibles with hex colours assigned.
@jnowland
jnowland / _mediaQueries.scss
Last active December 12, 2015 04:18
A file I have in my helpers that makes doing inline media queries pretty good :) extra-small, small, medium, large, larger, huge, massive
/* ==========================================================================
Media Queries:
How to get inline media querey
Order from small to big.
extra-small, small, medium, large, larger, huge, massive.
Should be noted when using min-width your styles outside any mediaqueries are the smallest and global.
@jnowland
jnowland / troll.css
Created February 18, 2013 05:29
makes things amazing.
* {
background: pink;
font-family: cursive;
text-transform: uppercase;
letter-spacing: -5px;
}
*:hover {
/*webkit rainbow gradient*/
background-image: -webkit-gradient(linear, left top, left bottom,