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 | |
for CHANGEFILE in *.changes; | |
do | |
str=`echo $CHANGEFILE | grep -v "source.changes"` | |
if [ -z "$str" ]; then | |
continue | |
fi | |
found="0" | |
while read line | |
do |
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
/** | |
* Reads audio devices from ALSA interface and returns count and array of | |
* strings containing the devices. | |
* | |
* @param[out] count Number of devices found. | |
* @param[out] Array of strings containing the device names. | |
* | |
*/ | |
static void getALSADevices(int *count, char **devices) | |
{ |
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/ruby -d | |
#### | |
# | |
# create_unhashed_links.rb | |
# | |
# Creates links that are unhashed to the Gitorious repositories. | |
# Helps link the repositories to Redmine. | |
# | |
# Spaces in project names are replaced with underscores. |
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 | |
# This script takes something like this as input: | |
# ID WorkId Date | |
# 1 2 12-10-2009 | |
# 2 16 01-01-2008</pre> | |
# And prints out this: | |
#+-----+----------+---------------+ | |
#|ID |WorkId |Date | |
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 | |
my $byte_num = 0; | |
my @vals; | |
while(<>) | |
{ | |
chomp; | |
$vals[$byte_num] = unpack('c', pack 's', hex($_)); | |
$byte_num++; |
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
import java.util.regex.*; | |
/** | |
* @brief This class is used to verify that input is a valid ISBN (International | |
* Standard Book Number). | |
* | |
* @note Invalid ISBN-13 codes have been published in books! Do not assume | |
* that just because this returns false for an existing ISBN, there is a bug. | |
* Verify with e.g. Amazon that the ISBN is correct first. | |
* |
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
CC = gcc | |
CCFLAGS = -Wall -ggdb3 | |
VPATH = /usr/include/ | |
OBJS = file1.o file2.o file3.o | |
%.o: %.c | |
${CC} ${CCFLAGS} -c $< hwcheck: ${OBJS} ${CC} ${CCFLAGS} ${OBJS} -o myapp clean: rm -f myapp *.o |
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
for line in `find $WORK_DIR -maxdepth 1 -type f -printf '%f/%A@' | sort -k 2` | |
do | |
FILE=`echo $line | sed -r 's/^(.*)\/(.*)$/\2/'` | |
# Do what ever you want with the file | |
done |
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 | |
while (<>) { | |
if (/[\p{L}]+/) { | |
print "letters\n"; | |
} else { | |
print "no letters\n"; | |
} | |
} |
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/python | |
# -*- coding: iso-8859-15 -*- | |
from urllib import urlopen | |
import re | |
import sys | |
class PlayerSeasonInfo: | |
team = '' | |
league = '' |