Skip to content

Instantly share code, notes, and snippets.

Working from home

Andrew Martin andrewmartin

Working from home
Block or report user

Report or block andrewmartin

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
andrewmartin / contentful.js
Created Mar 5, 2018
View contentful.js
const contentful = require('contentful');
const client = contentful.createClient({
space: '<space_id>',
accessToken: '<access_token>',
export default (req, res) => {
return client.getEntry({
content_type: 'page',
View pre-commit
#!/usr/bin/env bash
STAGED_FILES=$(git diff --name-only --cached --diff-filter=ACM -- *.jsx *.js)
# STAGED_FILES=$(git diff -- *.jsx --cached --name-only --diff-filter=ACM)
BIN_PATH="$(git rev-parse --show-toplevel)/node_modules/.bin"
eslint() {
# Check for eslint
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
andrewmartin / post-receive
Last active Sep 12, 2017
post-receive hook for pm2
View post-receive
#!/usr/bin/env bash
# start your app first; pm2 start ./build/server.js --name app-name
# then, place in repo.git/hooks/post-receive
# and set permissions:
# chmod +x hooks/post-receive
set -u
set -e
View .csscomb.json
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "upper",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"quotes": "double",
View .csscomb.json
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "upper",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "single",
andrewmartin / cloudSettings
Last active Jan 20, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
View env.js
exports.config = {
api: "",
root: "",
port: 1234,
fb: {
appId: '246541675489369'
environment: 'development'
'use strict'
module.exports = (grunt) ->
path = require('path')
# load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks
# config
View wordpress-sample.html
<strong class="style-label">Headings</strong>
<h1>Header one</h1>
<h2>Header two</h2>
<h3>Header three</h3>
<h4>Header four</h4>
<h5>Header five</h5>
<h6>Header six</h6>
<strong class="style-label">Blockquotes</strong class="style-label">
Single line blockquote:
<blockquote>Stay hungry. Stay foolish.</blockquote>
You can’t perform that action at this time.