You need to have SketchTool installed somewhere in your path.
Add this in your ~/.gitconfig
file (for some reason, it won't work in a local .gitconfig file):
// Tests with Lodash 4.16.4 | |
// Thanks to http://stackoverflow.com/questions/19965844/lodash-difference-between-extend-assign-and-merge | |
_.assignIn ({}, { a: 'a' }, { a: 'bb' }) // => { a: 'bb' } | |
_.merge ({}, { a: 'a' }, { a: 'bb' }) // => { a: 'bb' } | |
_.defaults ({}, { a: 'a' }, { a: 'bb' }) // => { a: 'a' } | |
_.defaultsDeep({}, { a: 'a' }, { a: 'bb' }) // => { a: 'a' } | |
--- |
ruby d:\dev\sh\sourcetree\sourcetree-open-on-github.rb %1 |
#!/usr/bin/env ruby | |
require 'csv' | |
# md - Tables - Create from CSV | |
# v1.1 2016-08-17 | |
# From the Markdown Service Tools <http://brettterpstra.com/projects/markdown-service-tools/> | |
# Converts CSV style input to MultiMarkdown tables | |
# Changelog | |
# 1.1: Fixed error when line ended with whitespace in middle of input |
#!/usr/bin/env babel-node | |
require('dotenv').config() | |
import contentful from 'contentful' | |
import fs from 'fs-extra-promise' | |
// Contentful Config | |
const apiToken = process.env.CONTENTFUL_DELIVERY_API_TOKEN | |
const spaceId = process.env.CONTENTFUL_SPACE_ID | |
const client = contentful.createClient({ accessToken: apiToken, space: spaceId }) |
#!/usr/bin/env bash | |
# Script to (selectively) save/load multiple Docker images to/from a directory. | |
# Run ./save-load-docker-images.sh for help. | |
set -e | |
directory=$PWD | |
filter="" | |
compress=0 |
You need to have SketchTool installed somewhere in your path.
Add this in your ~/.gitconfig
file (for some reason, it won't work in a local .gitconfig file):
var doc = context.document | |
var selectLayersOfType_inContainer = function(layerType, containerLayer) { | |
// Filter layers using NSPredicate | |
var scope = (typeof containerLayer !== 'undefined') ? [containerLayer children] : [[doc currentPage] children], | |
predicate = NSPredicate.predicateWithFormat("(className == %@)", layerType), | |
layers = [scope filteredArrayUsingPredicate:predicate]; | |
// Deselect current selection |
web: NODE_ENV=production node server.js |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed | |
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2" |