Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
@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 / bitcoin.sh
Created June 4, 2011 10:32
Bitcoin Mining Script for Debian
#!/bin/bash
### BEGIN INIT INFO
# Provides: BitCoinMining
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Start/stop BitCoing Mining poclbm-mod
### END INIT INFO
@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)]
@noqqe
noqqe / rot13.bash
Created August 13, 2011 11:39
An implementation of rot13 encryption written in pure bash
#!/bin/bash
# Choose your favorite table
# classic
SIGNS=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
# advanced
#SIGNS=( a b c d f e h g j i l k m n o p q r s t u v w x y z . - ? ! "#" "+" )
@noqqe
noqqe / mytinytodo2taskwarrior.bash
Created September 25, 2011 11:12
MyTinyTodo to Taskwarrior Migration
#!/bin/bash
MYSQLUSER="user"
MYSQLPW="pw"
MYSQLDB="mytinytodo"
OIFS=$IFS ;
IFS='
'
for x in $(mysql -u $MYSQLUSER -p$MYSQLPW -e "use $MYSQLDB ; select d_completed, tags_ids, mtt_lists.name as liste, title from mtt_todolist, mtt_lists where mtt_lists.id = mtt_todolist.list_id;" --batch | grep -v ^d_complet); do
@noqqe
noqqe / v-barplot
Created April 1, 2012 09:21
v-barplot example
$ ./v-barplot foo:24 bar:90 alice:76 flo:32 blu:79 fa:12 bob:230 kika:121
230 | ###
220 | ###
210 | ###
200 | ###
190 | ###
180 | ###
170 | ###
160 | ###
150 | ###
@noqqe
noqqe / ext-verify.sh
Created May 5, 2012 09:45
ext-verify.sh
#!/bin/bash
# ext-verify: Verify if max mount count or cyclic fsck
# on ext2,ext3,ext4 filesystems has been reached.
# Copyright: (C) 2011 Florian Baumann <florian.baumann@noris.net>
# License: GPL-3 <http://www.gnu.org/licenses/gpl-3.0.txt>
# Date: Tuesday 2012-05-04
# Configuration
DUMPE2FS=$(which dumpe2fs)
DUMPOPTS="-h"
@noqqe
noqqe / mlxc.sh
Last active May 20, 2019 09:22
mass script for my lxc setup
#!/bin/bash
### Binaries
SCREEN=$(which screen)
LXCSTART=$(which lxc-start)
LXCSTOP=$(which lxc-stop)
### Configuration to get lxc directory
LXCCONF="/etc/default/lxc"
ERR=0
@noqqe
noqqe / ab-bench.txt
Created May 21, 2012 19:46
apache2.4 vs apache2.2 benchmark
Benchmarking 10.10.0.17 (be patient) | Benchmarking 10.10.0.16 (be patient)
Server Software: Apache/2.2.16 | Server Software: Apache/2.4.2
Server Hostname: 10.10.0.17 | Server Hostname: 10.10.0.16
Server Port: 80 Server Port: 80
Document Path: / Document Path: /
Document Length: 177 bytes Document Length: 177 bytes