Skip to content

Instantly share code, notes, and snippets.

@garrettmac
garrettmac / 2016-election-results.md
Last active June 15, 2017 14:33
2016 Election Results - Blue States Trump Won

Election Results

Trump Won 3 Blue States

He gave speeches in these three Blue states that Red candidates don't ever even bother with. Resulting in his win.

Michigan Pennsylvania Wisconsin
Blue State Since 1984 1988 1934
Years Blue 32 years 28 years 36 years
@garrettmac
garrettmac / react-native-popover.md
Created May 11, 2017 00:12
react native plugins config
import Popover from 'react-native-popover';
this._closePopover = this._closePopover.bind(this)

in constructor

/*
https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Ces2016%2Creact%2Cstage-2&targets=&browsers=&builtIns=false&code=const%20cat%20%3D%20%7B%0A%20%20name%3A%20'Luna'%2C%0A%20%20friends%3A%20%7Bbest%3A%20'Ellie'%7D%2C%0A%20%20legs%3A%204%2C%0A%7D%0Aconst%20strangeCat%20%3D%20%7B...cat%2C%20legs%3A%206%7D%0A%0Aconst%20sameCat%20%3D%20%7B...cat%7D%0Aconsole.log(cat.friends%20%3D%3D%3D%20sameCat.friends)%20%2F%2F%20true%0AsameCat.friends.best%20%3D%20'Buddy'%0Aconsole.log(cat.friends.best)%20%2F%2F%20Buddy%0Aconsole.log(strangeCat)
http://www.reactnativeexpress.com/object_spread
*/
const cat = {
name: 'Luna',
friends: {best: 'Ellie'},
legs: 4,
@garrettmac
garrettmac / cheatsheet.md
Created February 7, 2017 19:03
terminal commands

Terminal

remove file rm -rf [folder] find mdfind -onlyin [file]

alias Create an alias •

@garrettmac
garrettmac / cheatsheet.md
Created February 7, 2017 19:03
terminal commands

Terminal

remove file rm -rf [folder] find mdfind -onlyin [file]

alias Create an alias •

Garrett,
Don’t shoot the messenger. This is a preliminary list of change requests I have received so far…
Let me know what you can to address and what will require additional costs. Some of this we might be able to do if you show us how to navigate, I tried to put this together in a way similar to navigating the site. A lot of it is UI/UX stuff.
Logo: Insert our old Used-Radios.com logo so we don’t have to rebrand all of our marketing documentation.
@garrettmac
garrettmac / hero.ts
Created January 21, 2017 22:57 — forked from brennanMKE/hero.ts
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@garrettmac
garrettmac / collection.liquid
Last active April 4, 2017 19:57
Shopify Used-Radios.com
{% comment %}
{% assign productsPerPage = settings.collection-products-number-of-rows | times: settings.collection-products-per-row %}
{% endcomment %}
{% assign productsPerPage = 370 %}
{% paginate collection.products by productsPerPage %}
{% assign platforms = 0 %}
{% if settings.share-widget-facebook %}{% assign platforms = platforms | plus: 1 %}{% endif %}
{% if settings.share-widget-twitter %}{% assign platforms = platforms | plus: 1 %}{% endif %}
{% if settings.share-widget-pinterest %}{% assign platforms = platforms | plus: 1 %}{% endif %}
{% if settings.share-widget-fancy %}{% assign platforms = platforms | plus: 1 %}{% endif %}
@garrettmac
garrettmac / custom.filter.buttons.tags.liquid
Last active March 15, 2023 00:10
Shopify Filter Snippets
Tag Filter:
<ul class="subnav clearfix">
<li{% unless current_tags %} class="active"{% endunless %}>
{% if collection.handle %}
<a href="/collections/{{ collection.handle }}{% if collection.sort_by %}?sort_by={{ collection.sort_by }}{% endif %}">All</a>
{% elsif collection.current_type %}
<a href="{{ collection.current_type | url_for_type | sort_by: collection.sort_by }}">All</a>