Skip to content

Instantly share code, notes, and snippets.

View zbyhoo's full-sized avatar

zbyhoo zbyhoo

  • Gamesture
  • Poland, Katowice
View GitHub Profile
@zbyhoo
zbyhoo / gcc2xml.pl
Created February 3, 2011 11:04
Script converting gcc output (warning and errors) to "some kind" of xml format.
#!/usr/bin/perl -w
use strict;
my $tag_main = "gcc_issues";
my $tag_total = "total";
my $tag_issue = "issue";
my $tag_count = "count";
my $tag_file = "file";
my $tag_line = "line";
@zbyhoo
zbyhoo / userdu.sh
Created January 26, 2011 10:56
Calculates total file space usage for each user in specified directory and subdirectories.
#!/bin/bash
function usage()
{
echo "Usage: `basename $0` [dir]"
echo " dir - directory to check (default is current directory)"
}
if [ "$1" == "-h" ]
then
@zbyhoo
zbyhoo / gcc2msvc.rb
Created January 10, 2011 16:08
Ruby script converting gcc output to msvc compatible one (go to line when error appears).
result = 0
while (line = gets)
index = line.index(/\.[ch]pp\:[0-9]/)
if (index == nil)
puts line
else
path_end = line.index(":", index)
linenr_end = line.index(":", path_end + 1)
@zbyhoo
zbyhoo / ps1_for_git.sh
Created January 4, 2011 09:08
PS1 containing information about current git branch.
PS1='\[\e[32m\]\w `git branch 2>/dev/null | grep -e '\''^*'\'' | sed -E '\''s/^\* (.+)$/(\1) /'\''`\n\$\[\e[0m\] '