These git hooks runs bundle or npm install automatically whenever you:
git checkouta new branch with a different Gemfile or package.json.git pulla change to Gemfile or package.json.
cd awesome_git_repo
| # http://aacable.wordpress.com/tag/squid-maximum-cache-hit/ | |
| # https://calomel.org/squid_adservers.html | |
| http_port 192.168.3.254:3128 | |
| http_port 10.0.0.253:3128 | |
| http_port 127.0.0.1:3128 intercept | |
| icp_port 7 | |
| dns_v4_first off | |
| pid_filename /var/run/squid.pid | |
| cache_effective_user proxy |
| var Parent = Bookshelf.Model.extend({ | |
| tableName: 'parent', | |
| child: function() { | |
| return this.hasOne(Child); | |
| } | |
| }); | |
| var Child = Bookshelf.Model.extend({ | |
| tableName: 'child', | |
| //this has an attribute parent_id |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var buffer = require('vinyl-buffer'); | |
| var source = require('vinyl-source-stream'); | |
| var browserify = require('browserify'); | |
| var uglify = require('gulp-uglify'); | |
| gulp.task('index', function(){ | |
| var bundler = browserify('newstimeline/livescript/index.ls'); | |
| bundler.transform('browserify-livescript'); | |
| return bundler.bundle({insertGlobals: true}) |
| #!/bin/bash | |
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
| #!/usr/bin/env coffee | |
| fs = require 'fs' | |
| sh = require 'execSync' | |
| config = JSON.parse fs.readFileSync 'package.json' | |
| fs.renameSync 'package.json', 'package.json.real' | |
| name = config.name = "#{config.name}-semver" |
Last updated: 2017-03-18
exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .
###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs
| # read more at https://terrty.net/2014/ssl-tls-in-nginx/ | |
| # latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf | |
| # security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net | |
| # your nginx version might not have all directives included, test this configuration before using in production against your nginx: | |
| # $ nginx -c /etc/nginx/nginx.conf -t | |
| server { | |
| # public key, contains your public key and class 1 certificate, to create: | |
| # (example for startssl) | |
| # $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null |
| # fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort) | |
| fshow() { | |
| local out shas sha q k | |
| while out=$( | |
| git log --graph --color=always \ | |
| --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | | |
| fzf --ansi --multi --no-sort --reverse --query="$q" \ | |
| --print-query --expect=ctrl-d --toggle-sort=\`); do | |
| q=$(head -1 <<< "$out") | |
| k=$(head -2 <<< "$out" | tail -1) |