Skip to content

Instantly share code, notes, and snippets.

View patrickleet's full-sized avatar

Patrick Lee Scott patrickleet

View GitHub Profile
{
"env": {
"node": true,
"es6": true
},
"extends": "standard",
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
@patrickleet
patrickleet / gist:23ca8f72d425eb084baa7b9973ce3872
Last active February 16, 2024 16:24 — forked from jenkek/gist:8858278
meta tags for seo
<meta charset="UTF-8">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Большинство поисковых серверов отображают содержимое поля description при выводе результатов поиска. Если этого тега нет на странице, то поисковый движок просто перечислит первые встречающиеся слова на странице, которые, как правило, оказываются не очень-то и в тему." />
<meta name="Keywords" content="HTML, META, метатег, тег, поисковая система" />
<meta name="author" content="Pat Scott">
Verifying that "patscott.id" is my Blockstack ID. https://onename.com/patscott
import pRequest from 'util/promiseRequest'
Object.resolve = function(path, obj) {
return path.split('.').reduce(function(prev, curr) {
return prev ? prev[curr] : undefined
}, obj)
}
export class RESTConnector {
constructor({ rootUrl, keyPath }) {
@patrickleet
patrickleet / Docker Cheatsheet.md
Last active October 15, 2016 14:08
docker | docker-machine | docker-compose | docker swarm cheatsheet

docker | docker-machine | docker-compose | docker swarm cheatsheet

docker-machine

Used to create VMs that run docker

create

docker-machine create -d virtualbox machinename
@patrickleet
patrickleet / gitflow.sh
Created October 18, 2015 00:43
Average git workflow
# create a branch (ex. 'bug/checkout-error '
# or 'feature/segment-analytics')
git checkout -b feature/example
# Do work, then commit your changes.
# To create a commit you first need to add the files
# you are going to commit. This is known
# as "staging the files".
# Check that the files changes are what you think.
@patrickleet
patrickleet / Modal.js
Created February 26, 2015 19:27
modals
Modal = function() {
if (! (this instanceof Modal)) {
return new Modal(options);
}
this.modalTemp = null;
this.clearTimeout = null;
this.inserted = false;
this.fixScrollPosition = true;
this._lastScrollTop = 0;
<!-- Context should be the object you are tagging -->
<template name="tagInput">
<select class='tag-input' name='tags[]' multiple="multiple">
{{#each tags}}
<option value="{{this}}" selected="true">{{this}}</option>
{{/each}}
</select>
</template>
@patrickleet
patrickleet / configureYelp.html
Last active August 11, 2017 16:05
Meteor OAuth1Binding REST calls using oauth1 package (Yelp example)
<template name='configureYelp'>
<div class="container">
<div class="section">
<h1>Yelp API Access Configuration</h1>
<p class="lead">Do not change if you don't know what you are doing.</p>
<p>{{currentConfig}}</p>
{{> quickForm schema=configureYelp doc=this id='configureYelp' type='method' meteormethod='configureYelp' buttonClasses="btn btn-primary" buttonContent="Configure Yelp"}}
</div>
</div>
</template>
// A Promise is an object that represents a task with two possible outcomes (success or failure) and holds callbacks that fire
// when one outcome or the other has occurred.
// But the biggest advantage of using Promises is that you can easily derive new Promises from existing ones.
// You might ask two Promises representing parallel tasks to give you a Promise that will inform you of their mutual completion.
// Or you might ask a Promise representing the first task in a series to give you a Promise representing the final task in
// the series.
// Without Promises
$.get('/mydata', {