Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
@noqqe
noqqe / gist:675349
Created November 13, 2010 14:01
mailto address antispam
<script language="javascript"><!--
var mailadrfoo="flo";
var maildomfoo="noqqe.de";
var mailarg="";
document.write('<a href="mailto:'+mailadrfoo+'@'+maildomfoo+mailarg+'">'+mailadrfoo+'@'+maildomfoo+'</a>');
//-->
</script>
<noscript>name&amp;nbsp;[at]&amp;nbsp;domain&amp;nbsp;[dot]&amp;nbsp;com</noscript>
@noqqe
noqqe / git_info
Created November 22, 2010 12:13
function to get a quick overview for your git repo
#!/bin/bash
# get a quick overview for your git repo
function git_info() {
if [ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]; then
# print informations
echo "git repo overview"
echo "-----------------"
echo
# print all remotes and thier details
@noqqe
noqqe / post-recieve
Created November 27, 2010 11:41
post-recieve hook for bare repos to use with redmine
#!/bin/bash
# post-recieve hook for redmine git repos
# clone git repo to redmine directory
# Copyright: (C) 2010 Florian Baumann <flo@noqqe.de>
# License: GPL-3 <http://www.gnu.org/licenses/gpl-3.0.txt>
# Date: Thursday 2010-11-26
# print some informations for user
echo "running post-receive hook..."
@noqqe
noqqe / gist:753005
Created December 23, 2010 13:55
Fraise App LaTeX Command
#!/bin/sh
# change to directory
cd %%d
# create pdf from .tex
/usr/texbin/pdflatex --output-directory %%d %%p
# get name
tex=%%p
@noqqe
noqqe / gist:824747
Created February 13, 2011 15:08
tiny yoda sentence generator
#!/bin/bash
WORDCOUNT="$#"
SENTENCE="$*"
NUMBER="0"
for x in $SENTENCE ; do
NUMBER=$(($RANDOM % $WORDCOUNT + 1))
while [ ! -z ${ARRAY[$NUMBER]} ]; do
@noqqe
noqqe / statistical.bash
Created April 12, 2011 20:29
statistical demo
# demo of http://github.com/noqqe/statistical
# git author visualization
# author commits getting by https://github.com/esc/git-stats
for a in $(git shortlog -sn --all | cut -f2 | cut -f1 -d' ');
do
echo -n "$a:"
git log $LOGOPTS --all --numstat --format="%n" --author=$a | cut -f3 | sort -iu | wc -l
done | statistical
@noqqe
noqqe / gist:921795
Created April 15, 2011 14:32
Writing 6000 Key:Values Pairs to github.com/noqqe/statistical
time for x in $(seq 1 6000); do echo "$x:$RANDOM" ; done | statistical
1 |#################### (21371)
2 |### (4322)
[...]
5995 |#################### (21371)
5996 |##################### (22318)
5997 |### (4428)
5998 |##### (6213)
5999 |########################### (28519)
6000 |###################### (23328)
@noqqe
noqqe / gist:923159
Created April 16, 2011 14:45
Replace Unix tools with bash interna
diff --git a/statistical b/statistical
index 50f443c..17423b3 100755
--- a/statistical
+++ b/statistical
@@ -20,11 +20,11 @@ fi
for data in $SUM; do
# Getting informations from parameters
- KEY=$(echo $data | awk -F: '{printf $1}')
- VALUE=$(echo $data | awk -F: '{print $2}')
$ ./rt-stats
RequestTracker-Stats April 2011
===================================================
Resolved ticket statistic for this month (April)
---------------------------------------------------
Tracy |##################### (22)
Amelie |##################### (22)
Kiri |############ (13)
Tersina |########## (11)
@noqqe
noqqe / gist:1031260
Created June 17, 2011 11:41
R Analytics of ZRE
#!/usr/bin/env Rscript
### General R-Script
# MySQL
library(RMySQL)
con <- dbConnect(MySQL(), user="", password="", host="", client.flag=CLIENT_MULTI_RESULTS)
# Style
zre_colors <- colors()[grep("green",colors())]
zre_mint <- colors()[c(48,86,50)]