This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2012 Coder of Salvation | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright (c) 2012 Coder of Salvation | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# minimalistic filebrowser script which enables 4-button navigation. | |
# | |
# Why: I needed a simple way to navigate thru files using simple keyboardbindings. | |
# | |
# Usage: | |
# nbrowser next dir | |
# nbrowser next file | |
# nbrowser prev dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[[ ! -n "$1" ]] && echo "usage: $0 <image> <outimage> <title> <thickness=200> <whiteoffset=20> <tracetreshold=15> <curvetreshold=4> <zoom=2>" && exit 1 | |
file="$1" | |
outfile="$2" | |
title="$3" | |
thickness="$4" | |
whiteoffset="$5" | |
tracetreshold="$6" | |
curvetreshold="$7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A quickndirty bash-utility to generate REST-documentation from sourcecode comments. | |
# (initially aimed at php-files, but js should also work) | |
# Basically its a c-style comment -> markdown -> html converter | |
# Dependancies: | |
# - awk | |
# - sed | |
# - bash | |
# - php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trim(){ | |
cat - | sed -e 's/^ *//g' -e 's/ *$//g' -e "s/'//g" | |
} | |
file="$(echo "$1" | trim)" | |
set -- "$file" # strip single quotes (PCFMAN) | |
path="$(dirname "$(readlink -f "$1")" )" | |
exepath=~/bin # /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/** | |
* File: imapmunch | |
* Date: Fri 18 Jan 2013 05:30:45 PM CET | |
* | |
* easily searches/selects emails from imapserver, using filters, scans hashtags, prices and so on | |
* | |
* Usage: imapmunch [filteroptions] [--output=json|xml|csv] | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example usage: cat foo.csv | while read line; do getCSVColumn "$line" 2; done | |
getCSVColumn(){ | |
echo "$1" | sed 's/,,,/###/g' | sed 's/,,/##/g' | sed 's/,/#/g' | cut -f$2 -d"#" | sed 's/"//g' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# example usage : xpath /tmp/test.json "foo->flop" | |
# example output: XML Developer's Guide | |
# | |
# given that /tmp/test.json looks like: | |
# { "foo": { "flop": "bar" } } | |
phpcode_jsonget=' | |
$parts = str_replace( array("'"'"'","]"), "", $argv[2] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# will show local notifications when something happens on IRC (using irssi) | |
# | |
# Usage: | |
# | |
# 1) make sure you have passwordless access to the server where irsii is running | |
# (hint: ssh-keygen & ssh-copy-id) | |
# 2) type in irssi: /set autolog on | |
# 3) look in ~/irclogs which channel you want to log (on the server running irssi) |