Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
ESC=$(printf "\e")
echo "$ESC[34;47mDATE$ESC[0m"
date
echo ""
echo "$ESC[34;47mUPTIME$ESC[0m"
uptime
echo ""
echo "$ESC[34;47mSTATUS$ESC[0m"
top -l1 -u -o cpu -S | head -n 12
echo " "
#!/bin/bash
# coming-home: configure home-dir with your dotfiles
# Copyright: (C) 2010 Florian Baumann <[email protected]>
# License: GPL3 <http://gnu.org/licenses/gpl-3.0.txt>
# get dotfiles
dotfiles=$(ls -la | grep -v ^d | awk '{print $8}'| grep -v ^coming-home.bash$ )
mode=${1:-normal}
@noqqe
noqqe / gist:614920
Created October 7, 2010 10:09
.vimrc
" ---------------------------------------------------------------------------
" General
" ---------------------------------------------------------------------------
set nocompatible " essential
set history=1000 " lots of command line history
set cf " error files / jumping
set ffs=unix,dos,mac " support these files
filetype plugin indent on " load filetype plugin
set isk+=_,$,@,%,#,- " none word dividers
@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 <[email protected]>
# 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)