Skip to content

Instantly share code, notes, and snippets.

View tsbarnes's full-sized avatar
🏳️‍🌈
being amazing

Sky Barnes tsbarnes

🏳️‍🌈
being amazing
View GitHub Profile
@4lun
4lun / index.html
Last active October 13, 2015 22:58
HTML Starting Point
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<title>Project</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1">
<meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes">
<script>
(function() {
@sindresorhus
sindresorhus / post-merge
Last active July 25, 2024 06:53
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"