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 bash | |
e="echo -e" | |
en="echo -en" | |
function i { | |
if [[ $1 == "ok" ]] | |
then | |
$e "\033[1;32mok\033[G * \033[0m" | |
elif [[ $1 == "fail" ]] |
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/sh | |
# Author: Konrad Mosoń <morsik@darkserver.it> | |
# Description: Simple Enemy Territory: Legacy installer | |
function m { | |
echo -e " \033[1;31m:\033[38;5;33m:\033[1;37m $1\033[0m" | |
} | |
if [ ! -n "$1" ]; then |
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 | |
MAKEOPTS="-j8" | |
RUBYDIR=${HOME}/ruby | |
einfo() { | |
echo -e "\033[1;32m * \033[1;37m${1}\033[0m" | |
} | |
rm -rf ~/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 python2 | |
import select | |
import sys | |
import socket | |
import Request | |
TCP_IP = "0.0.0.0" | |
TCP_PORT = 1234 | |
BUFFER_SIZE = 4 |
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/perl -w | |
# Author: Konrad "morsik" Mosoń <mosonkonrad@gmail.com> | |
# linked here: http://wiki.libvirt.org/page/Networking#Applying_modifications_to_the_network | |
use strict; | |
use warnings; | |
my $net = $ARGV[0]; |
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
Index: cgame/cg_crash.c | |
=================================================================== | |
--- cgame/cg_crash.c (revision 535) | |
+++ cgame/cg_crash.c (working copy) | |
@@ -151,11 +151,19 @@ | |
//If we don't do this stack traces are less accurate. | |
#ifdef GLIBC_21 | |
Crash_Printf("Stack frames: %Zd entries\n", size-1); | |
+#ifndef __x86_64__ | |
array[1] = (void *)ctx->uc_mcontext.gregs[EIP]; |
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
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
chmod 600 "$SSH_ENV" | |
. "$SSH_ENV" > /dev/null |
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
from django import template | |
from django.utils.safestring import mark_safe | |
import re | |
register = template.Library() | |
@register.filter | |
def colorize(t, a='white'): | |
if t == None: |
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
-- {{{ Key bindings | |
globalkeys = awful.util.table.join( | |
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2+") end), | |
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2-") end), | |
awful.key({ modkey, }, "Pause", function () awful.util.spawn("xscreensaver-command -lock") end), | |
awful.key({ modkey, }, "Left", awful.tag.viewprev ), | |
awful.key({ modkey, }, "Right", awful.tag.viewnext ), | |
awful.key({ modkey, }, "Escape", awful.tag.history.restore), |
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/perl -w | |
use strict; | |
use warnings; | |
use Net::Ping; | |
my @hosts = ( | |
'localhost.localdomain', | |
); |