Skip to content

Instantly share code, notes, and snippets.

View chriswburke's full-sized avatar
🕹️
ᕙ(⇀‸↼‶)ᕗ

Chris W. Burke chriswburke

🕹️
ᕙ(⇀‸↼‶)ᕗ
View GitHub Profile
@chriswburke
chriswburke / input.scss
Created September 9, 2020 18:33
Generated by SassMeister.com.
$brand: 'BMWTypeNext', 'Helvetica Neue', '-apple-system', 'system-ui', 'BlinkMacSystemFont', serif;
$serif: 'SangBleuKingdom','Times', 'Times New Roman', serif;
$arial: 'Arial', 'Helvetica Neue', sans-serif;
$arialMT: 'Arial MT', 'Arial', 'Helvetica Neue', sans-serif;
$theme-core: (
headline: (
1: (
default: ($brand, 50px, 68px, 1px, 400),
md: ($brand, 80px, 90px, 1px),
@chriswburke
chriswburke / nvm_auto_switching.sh
Created January 9, 2020 02:40 — forked from tribou/nvm_auto_switching.sh
Use PROMPT_COMMAND and nvm to auto-switch versions of node
#!/bin/bash
# Activate a version of Node that is read from a text file via NVM
function use_node_version()
{
local TEXT_FILE_NAME="$1"
local CURRENT_VERSION=$([ -n "$HAS_NVM" ] && nvm current)
local PROJECT_VERSION=$([ -n "$HAS_NVM" ] && nvm version $(cat "$TEXT_FILE_NAME"))
# If the project file version is different than the current version
@chriswburke
chriswburke / Create Install Media.txt
Last active June 21, 2018 21:30
Create Install Media
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume [VOLUME] --applicationpath /Applications/Install\ macOS\ High\ Sierra.app
<amp-analytics>
<script type="application/json">
{
"requests": {
"pageview": "https://keystone.sitecore81u1/?url=${canonicalUrl}&title=${title}&acct=${account}",
"event": "https://keystone.sitecore81u1/?eid=${eventId}&elab=${eventLabel}&acct=${account}"
},
"vars": {
"account": "ABC123"
},
@chriswburke
chriswburke / bash-script-git.sh
Created August 11, 2016 23:38 — forked from salcode/bash-script-git.sh
Notes for bash scripting git commands
# Current branch - Determine current git branch, store in $currentbranch, and exit if not on a branch
if ! currentbranch=$(git symbolic-ref --short -q HEAD)
then
echo We are not currently on a branch.
exit 1
fi
# Uncommited Changes - Exit script if there uncommited changes
if ! git diff-index --quiet HEAD --; then
echo "There are uncommited changes on this repository."
@chriswburke
chriswburke / keystone2heroku.md
Created November 21, 2016 01:11 — forked from vitalbone/keystone2heroku.md
Deploying KeystoneJS to Heroku

Deploying a Keystone App to Heroku

Keystone comes completely set up to install on Heroku in a couple of steps.

1. Sign up for a Heroku account and install the Heroku Toolbelt.

Log in with it and you're ready to begin. Heroku uses git to deploy a new site, so with that in mind:

2. Create a new repository on Github and then clone it.

// Modified Isotope methods for gutters in masonry
$.Isotope.prototype._getMasonryGutterColumns = function() {
var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
containerWidth = this.element.width();
this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||
// Or use the size of the first item
this.$filteredAtoms.outerWidth(true) ||
// If there's no items, use size of container
containerWidth;
@chriswburke
chriswburke / IE Conditional classes
Created June 3, 2013 14:03
Now you can write IE specific styles in a regular stylesheet, by prefacing the CSS selectors with .ie
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html dir="ltr" lang="en-US"class="no-js iem7"> <![endif]-->
<!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6 oldie"> <![endif]-->
<!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7 oldie"> <![endif]-->
<!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8 oldie"> <![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html dir="ltr" lang="en-US" class="no-js"><!--<![endif]-->
@chriswburke
chriswburke / loader.js
Created November 3, 2015 22:18
Async Loader
var loader = {
script: function ( url ) {
var script = document.createElement( 'script' );
script.src = url;
return script;
},
css: function ( url ) {
var link = document.createElement( 'link' );
link.rel = "stylesheet";
link.type = "text/css";
@chriswburke
chriswburke / gist:2b5dc1a1ea750182019c
Created November 2, 2015 00:10
Preload images in css
<style>
:root {content:url(logo.png) url(banner-header.jpg) url(social-sprite.png) url(conception-design.jpg) url(bkgnd.png)}
</style>
http://informoid.com/en/conception-design/preload-css.html