Skip to content

Instantly share code, notes, and snippets.

View HaykoKoryun's full-sized avatar

Hayko Koryun HaykoKoryun

  • VMware
  • Yerevan, Armenia
View GitHub Profile
@HaykoKoryun
HaykoKoryun / post-update
Created February 7, 2016 11:23
git post-update hook
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.
@HaykoKoryun
HaykoKoryun / zippy.php
Last active August 25, 2016 14:55
async gzip on server with email notification
<?php
$background = "> /dev/null 2>/dev/null &";
$input = "";
$output = "";
$email = "bob@bob.com";
$subject = "$output done";
$cwd = getcwd();