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
(presentation :output "foo.pdf" :width 1024 :height 768 | |
(slide | |
(title "foo") | |
(image "foo.png" :width 200 :height 200 :caption "A typical foo.")) | |
(slide | |
(title "bar") | |
(ulist | |
"test 1" | |
"test 2")) |
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
while(true) do if( curl http://www.iwt.be/nieuws/feed/92 2> /dev/null | grep "Dec 2010" ); then amixer sset Master,0 80%,80%; curl http://www.wavsource.com/snds_2010-11-21_1584521671331348/video_games/duke/make_day.wav > alert.wav; mpg123 alert.wav; break; fi; sleep 2; 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
require 'gserver' | |
require 'timeout' | |
require 'thread' | |
class ForwardThread < Thread | |
MAX_DATA = 1000 * 1024 | |
TIME_SLOT = 0.3 | |
@@lock = Mutex.new | |
@@data_sent = 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
### memset2 ### | |
.macro f_fill64 dst, offset, val, fixup | |
9: sw \val, (\offset + 0 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 1 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 2 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 3 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 4 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 5 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 6 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous | |
9: sw \val, (\offset + 7 * 4)(\dst); .section __ex_table,"a"; .word 9b, \fixup; .previous |
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
OLD MEMSET: 170963885 loops, 2 bytes/loop, 10 sec, 32 MB/sec | |
NEW MEMSET: 238815611 loops, 2 bytes/loop, 10 sec, 45 MB/sec | |
==================================== | |
OLD MEMSET: 182202651 loops, 4 bytes/loop, 10 sec, 69 MB/sec | |
NEW MEMSET: 177544626 loops, 4 bytes/loop, 10 sec, 67 MB/sec | |
==================================== | |
OLD MEMSET: 197814868 loops, 8 bytes/loop, 10 sec, 150 MB/sec | |
NEW MEMSET: 177487994 loops, 8 bytes/loop, 10 sec, 135 MB/sec | |
==================================== | |
OLD MEMSET: 177510297 loops, 16 bytes/loop, 10 sec, 270 MB/sec |
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
/* Always change a */ | |
// Do we need to change a??/ | |
if(aChanged) | |
foo->a = a; | |
/* Never change a */ | |
// Do we need to change a??/ | |
if(aChanged) foo->a = a; |
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
[Fri Apr 13 11:14:09.029 2012] A4 00070.912.781 errApp: 301 errapp/nfr/cpu (01307) Less than 100000 filehandles left! | |
[Fri Apr 13 11:14:09.031 2012] A4 00070.918.151 errApp: 301 errapp/nfr/cpu (01244) Process /usr/sbin/udevd (pid: 180) has 12 file handles open. | |
[Fri Apr 13 11:14:09.033 2012] A4 00070.918.854 errApp: 301 errapp/nfr/cpu (01244) Process /philips/tools/ostracefiforeader (pid: 225) has 21 file handles open. | |
[Fri Apr 13 11:14:09.035 2012] A4 00070.920.217 errApp: 301 errapp/nfr/cpu (01244) Process /philips/apps/amApp (pid: 276) has 105 file handles open. | |
[Fri Apr 13 11:14:09.036 2012] A4 00070.931.222 errApp: 301 errapp/nfr/cpu (01289) /proc/trcext: 4 descriptors | |
[Fri Apr 13 11:14:09.039 2012] A4 00070.931.429 errApp: 301 errapp/nfr/cpu (01289) /mnt/jffs0/boot/am: 4 descriptors | |
[Fri Apr 13 11:14:09.041 2012] A4 00070.931.581 errApp: 301 errapp/nfr/cpu (01289) /dev: 61 descriptors | |
[Fri Apr 13 11:14:09.042 2012] A4 00070.931.628 errApp: 301 errapp/nfr/cpu (01289) anon_inode: 6 descriptors | |
[Fri Apr 13 |
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
Dir['*.log'].each do |fname| | |
log = Log.parse(fname) | |
symbol = log.symbols.values.sort_by { |s| -s.charcount }.first | |
line = log.lines.values.sort_by { |s| -s.charcount }.first | |
puts "#{log.cats_charcount}/#{log.charcount} in #{log.name}, most offensive: #{symbol.name} (#{symbol.charcount}), #{line.name} (#{line.charcount})" | |
end | |
# Output: | |
# 2169/21484 in regexp-info.log, most offensive: -/legacy/printf (983), -/legacy/printf:0000 (983) | |
# 212132/227923 in teraterm.log, most offensive: amApp/resmgmt (22885), amApp/resmgmt:0850 (16423) |
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
# Stats about a single log | |
class Log | |
# Load a file and parse every line as a print. | |
def self.parse(file_path) | |
Log.new(file_path, File.readlines(file_path)) | |
end | |
# Number of lines in the file and number of lines that are valid CATS prints | |
attr_reader :linecount, :cats_linecount, | |
# Number of characters that are in the file, part of CATS prints and part of CATS header overhead, respectively |
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 | |
SIZE=`expr $1 \* 1024` | |
if [[ x$SIZE == x ]] | |
then | |
MEM=`free | grep Mem | sed -e "s/[^0-9]*\([0-9]\+\).*/\1/"` | |
SIZE=`expr $MEM + $MEM / 4` | |
echo "No size provided, using 125% of memory size (${SIZE}KB)" | |
fi | |
COUNT=`expr $SIZE / 4` |
OlderNewer