Skip to content

Instantly share code, notes, and snippets.

James Nowland jnowland

Block or report user

Report or block jnowland

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jnowland
jnowland / SassMeister-input.scss
Created Feb 26, 2017 — forked from indrekpaas/SassMeister-input.scss
Precise control over responsive typography for Sass
View SassMeister-input.scss
// ----
// libsass (v3.3.6)
// ----
// =========================================================================
//
// PRECISE CONTROL OVER RESPONSIVE TYPOGRAPHY FOR SASS
// ---------------------------------------------------
// Indrek Paas @indrekpaas
//
View calculators.scss
@function strip-units($number) {
@return $number / ($number * 0 + 1);
}
@function em($target, $context: $base-font-size, $unitless: false) {
@if ($unitless == false) {
@return ($target / $context) * 1em;
}
@else {
@return strip-units(($target / $context));
@jnowland
jnowland / 0-model-override.js
Created Mar 23, 2016 — forked from spencermefford/0-model-override.js
An alternative to extending Loopback's built in models. In our application, we wanted to create a custom role called "ecm-administrator" that would have the ability to create and manage users.
View 0-model-override.js
module.exports = function (app) {
var _ = require('lodash');
var User = app.models.User;
var Role = app.models.Role;
var RoleMapping = app.models.RoleMapping;
var ACL = app.models.ACL;
/*
* Configure ACL's
*/
@jnowland
jnowland / Add files to .txt
Created Mar 8, 2016
Linux Commands for assests
View Add files to .txt
ls > filenames.txt
View BC-meta-template.tpl
{% comment -%}
#----------------------------------
# Meta Details - /Templates/_includes/html.metaDetails.tpl
#----------------------------------
To use this meta template insert the above variables above the include:
{% assign metaTitle = "" -%}
{% assign metaDescription = "" -%}
{% assign metaTags = "" -%}
{% assign metaCategory = "" -%}
{% assign metaTwitterHandle = "" -%}
@jnowland
jnowland / IE9.md
Last active Nov 4, 2015
Browser Upgrades + CSS Benefits
View IE9.md

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
@jnowland
jnowland / MetaDataTags.html
Last active Aug 29, 2015
Credit Card Gist
View MetaDataTags.html
<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 / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:6756540c1bda46d4d51e
# 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
View preferences.sublime-settings
{
"bold_folder_labels": true,
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
You can’t perform that action at this time.