Skip to content

Instantly share code, notes, and snippets.

@ceicke
ceicke / set_environment_vars.sh
Created July 31, 2018 15:39
Set some environment variables for semaphore
export PGCLUSTER="9.4/main"
@ceicke
ceicke / pg-downgrade-semaphore.sh
Last active March 5, 2019 15:16
Downgrade PostgreSQL on Semaphore
#!/usr/bin/env bash -l
set -e
###
# Add the line below to your setup command in Project Settings
#
# wget https://gist.githubusercontent.com/mimimalizam/27959bbc653de3965bb40955f4bc43df/raw/pg-downgrade-semaphore.sh && bash pg-downgrade-semaphore.sh
#
# Note: reset your dependency cache in Project Settings > Admin, before running this script
@ceicke
ceicke / export_done.scpt
Created January 14, 2014 21:28
Using EyeTV, the following two scripts first export the recorded file to your Desktop and then imports it to your iTunes library. Place the scripts into '/Library/Application Support/EyeTV/Scripts/TriggeredScripts' . Make sure to adjust the 'destFolder' variable according to your username.
on ExportDone(recordingID)
set destFolder to "Users:ceicke:Desktop:"
set tvShow to "bla.mp4"
tell application "iTunes"
activate
set newTVShow to ("Macintosh HD:" & destFolder & tvShow) as alias
add newTVShow
quit
@ceicke
ceicke / metrics.sh
Created August 10, 2012 09:57
Get some code line vs. test code metrics for each tag
#!/bin/bash
counter=0
for tag in `git for-each-ref --sort=taggerdate --format='%(refname:short)' refs/tags`
do
echo $tag
git checkout $tag
code_line_count=`grep -vR '^\s*$\|^\s*#.*$' ./app/**/* | wc -l`
test_line_count=`grep -vR '^\s*$\|^\s*#.*$' ./features/**/* | wc -l`