Skip to content

Instantly share code, notes, and snippets.

View andrewmartin's full-sized avatar
👨‍💻
code life

Andrew Martin andrewmartin

👨‍💻
code life
View GitHub Profile
➜ pos-mobile-app-deploy NA-17-borrower-app-profile-development ✓ y start:local
yarn run v1.22.19
$ rnuc .env.client_b.yml; NODE_ENV=development react-native start
▒▒▓▓▓▓▒▒
▒▓▓▓▒▒░░▒▒▓▓▓▒
▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
@andrewmartin
andrewmartin / index.html
Created November 28, 2023 19:20
avantecosmetic.com <head> snippet
<head>
<meta content="INDEX, FOLLOW" name="ROBOTS" class="next-head" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.0/polyfill.min.js" type="text/javascript"
class="next-head"></script>
<meta content="width=device-width, initial-scale=1, user-scalable=no" name="viewport" class="next-head" />
<link href="/static/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" class="next-head" />
<link href="/static/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png" class="next-head" />
<link href="/static/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png" class="next-head" />
<link href="/static/site.webmanifest" rel="manifest" class="next-head" />
<link color="#5bbad5" href="/static/safari-pinned-tab.svg" rel="mask-icon" class="next-head" />
@andrewmartin
andrewmartin / node-download.js
Created April 10, 2014 08:09
Download files with node.js
var fs = require('fs'),
stub = require('./stub'),
_ = require('underscore'),
request = require('request');
// config for local file
var basePath = "images/",
data = stub.data,
urlRoot = "http://cdn.catalogs.com/";
@andrewmartin
andrewmartin / cloudSettings
Last active January 20, 2019 23:04
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-20T23:04:39.991Z","extensionVersion":"v3.2.4"}
@andrewmartin
andrewmartin / SassMeister-input.scss
Created March 12, 2014 06:00
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
@andrewmartin
andrewmartin / contentful.js
Created March 5, 2018 02:44
contentful-api-endpoint-node
const contentful = require('contentful');
const client = contentful.createClient({
space: '<space_id>',
accessToken: '<access_token>',
});
export default (req, res) => {
return client.getEntry({
content_type: 'page',
@andrewmartin
andrewmartin / pre-commit
Last active February 13, 2018 22:53
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() {
ESLINT="$BIN_PATH/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
andrewmartin / post-receive
Last active September 12, 2017 00:19
post-receive hook for pm2
#!/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
@andrewmartin
andrewmartin / .csscomb.json
Created September 10, 2017 22:51
csscomb-amartin
{
"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",