Skip to content

Instantly share code, notes, and snippets.

@thenoseman
thenoseman / watchdog.pl
Created August 4, 2010 10:38
File watcher
#!/usr/bin/perl
# watchfile:
# This script prints info about changes to the file(s) specified
# as command-line arguments.
# Options:
# By default, the script checks on the file(s) every 10 seconds.
# If you want to specify a different time interval, use the "-interval" option.
# By default, the script does not report on access-time changes.
@thenoseman
thenoseman / make_chrome_app.sh
Created October 29, 2010 09:24
makes a Mac-Chrome App bind to one URL. For Webmail.
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@thenoseman
thenoseman / vimeo_downloader.sh
Created November 22, 2010 13:53
Download non downloadable Vimeo-Videos
#!/bin/sh
#
# Vimeo Downloader
#
# Copyright (C) 2008 Denver Gingerich
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
@thenoseman
thenoseman / create_fluild_like_chrome_app.sh
Created November 22, 2010 13:57
Create a standalone bound to one URL Chrome App
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@thenoseman
thenoseman / german_cucumber
Created February 8, 2011 08:25
Änderungen damit die deutsche Cucumber Variante besser funktioniert
Aufgabe war also, diesen Begriff in den Sprachdefinitionen von Cucumber zu ändern, ohne das GEM selber zu ändern (um die Updatefähigkeit zu erhalten).
Und so gehts:
- languages.yml aus dem gem in features/support/custom_langages.yml kopieren.
- Dort nur "de" drin lassen, den Rest entfernen:
"de":
name: German
native: Deutsch
@thenoseman
thenoseman / svn_post_commit_mail
Created February 8, 2011 08:44
Sending commit mails from SVN
#
# Send post-SVN commit mail ans link to Jira when
# the message contains (#JIRA-ID)
#
REPOS="$1"
REV="$2"
/usr/local/bin/svnnotify --repos-path "$1" --revision "$2" --to receiver@domain.de --handler HTML::ColorDiff --with-diff -E --smtp mailhost-name-or-ip --subject-prefix "Commit " --diff-switches "-x -b" --user-domain mail-domain.de --ticket-map '\((#(.*?))\)=https://your-jira-url/browse/%s'
@thenoseman
thenoseman / git-aliasses
Created February 16, 2011 21:40
My git aliasses
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.st status

A Thor Task to unwatch all Github watched repositories (excluding owned) and optionally export to delicious.

Sorry Github, for I have sinned. I use the Watch feature as a bookmarker.

Install required gems:

gem install thor rest-client

Use it as such:

@thenoseman
thenoseman / add-collaborator
Created July 3, 2011 20:31
Adds a github user to all private repositories of another user
#!/bin/bash
#
# Adds a github user to all private repositories of another user
#
SCRIPTNAME=`basename $0`
GITHUB_SOURCE_USER=""
GITHUB_TARGET_USER=""
GITHUB_SOURCE_PWD=""
@thenoseman
thenoseman / jsonval.sh
Created July 5, 2011 12:00 — forked from cjus/jsonval.sh
Extract a JSON value from a BASH script
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`