Skip to content

Instantly share code, notes, and snippets.

View vidakovic's full-sized avatar
🎯
Focusing

Aleksandar Vidakovic vidakovic

🎯
Focusing
View GitHub Profile
@vidakovic
vidakovic / gist:f3c04988aad928e9f3fd
Created February 3, 2015 21:57
Wakatime Git post-commit hook
#!/bin/bash
# NOTE: actually it would be nice to add something like the branch and SHA, but for the sake of demonstration I'm just using this file to feed Wakatime
# these variables are not used, but they might be useful; for someone else to play around
MESSAGE=$1
SHA=$(git rev-parse HEAD)
BRANCH=$(git symbolic-ref --short HEAD)
# give it a name
@vidakovic
vidakovic / download.sh
Created September 18, 2014 13:57
Nginx RTMP download and compile
#!/bin/sh
NGINX_FILE=$(wget -O- http://nginx.org/download | egrep -o 'nginx-[0-9\-\.]+.tar.gz' | sort -V | tail -1)
NGINX_RTMP_FILE=$(wget -O- https://github.com/arut/nginx-rtmp-module/releases | egrep -o '/arut/nginx-rtmp-module/archive/v[0-9\-\.]+.tar.gz' | sed "s/\/arut\/nginx-rtmp-module\/archive\///" | sort -V | tail -1)
#NGINX_PAGESPEED_FILE=$(wget -O- https://github.com/pagespeed/ngx_pagespeed/releases | egrep -o '/pagespeed/ngx_pagespeed/archive/v[a-z0-9\.\-]+.tar.gz' | sed "s/\/pagespeed\/ngx_pagespeed\/archive\///" | sort -V | tail -1)
NGINX_PAGESPEED_FILE="v1.8.31.4-beta.tar.gz"
NGINX_PAGESPEED_VERSION=$(echo $NGINX_PAGESPEED_FILE | sed "s/v//" | sed "s/-beta.tar.gz//")
OPENSSL_FILE=$(wget -O- https://www.openssl.org/source | egrep -o 'openssl-[a-z0-9\-\.]+.tar.gz' | sort -V | tail -1)
cd target