Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
########################################################################
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
root@hiphop:~/wordpress3# gdb $HPHP_HOME/src/hphpi/hphpi
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
<html>
<head>
<title>Simple javascript timed output</title>
<script language="Javascript">
var delay = 1000; // 1 second delay
function writeOut() {
// get content via xml http request or whatever
# encoding: utf-8
require 'rubygems'
require 'net/ping'
hosts = ['www.google.com',
'www.deviantart.com',
'www.facebook.com',
'www.twitter.com',
'www.yahoo.com',
root@ubuntu:/mnt/foodisk/benchmarks# grep -A3 real results-*
results-btrfs-sda+mmc-relatime,ssd.txt:real 12m31.455s
results-btrfs-sda+mmc-relatime,ssd.txt-user 0m58.168s
results-btrfs-sda+mmc-relatime,ssd.txt-sys 6m29.516s
results-btrfs-sda+mmc-relatime,ssd.txt-
--
results-btrfs-sdaonly-relatime,ssd_spread.txt:real 13m28.983s
results-btrfs-sdaonly-relatime,ssd_spread.txt-user 0m58.176s
results-btrfs-sdaonly-relatime,ssd_spread.txt-sys 6m31.064s
results-btrfs-sdaonly-relatime,ssd_spread.txt-
#!/bin/bash
SRC=/home/velenux/c0ding/ # lots of small files, and some bigger ones mixed in
DEST=$1/velebench/
echo "Starting test: "
echo " - SRC: ${SRC}"
echo " - DEST: ${DEST}"
echo ""
#!/usr/bin/perl
use strict;
use warnings;
my %rows;
my %published;
my $files_examined = 0;
# populate rows hash
@velenux
velenux / watir-begin-rescue.rb
Created December 30, 2010 09:25
Watir begin/rescue encapsulation for teh lazy
class Element
attr_reader :description, :id, :xpath, :name, :value, :text
def initialize(opts={})
@description = opts[:description] || nil
@id = opts[:id] || nil
@xpath = opts[:xpath] || nil
@name = opts[:name] || nil
@value = opts[:value] || nil
@text = opts[:text] || nil
@velenux
velenux / howmany-today.sh
Created January 4, 2011 20:23
how many files today?
#!/bin/bash
FILES=$(find -name '*.ref' -ctime -1 -print)
N_FILES=$(find -name '*.ref' -ctime -1 -print|wc -l)
TIMESTAMP=$(stat -c %y $FILES | cut -b1-16 | sort | tail -n1)
DATE=${TIMESTAMP:0:10}
TIME=${TIMESTAMP:11:16}
echo $DATE $N_FILES files last $TIME
@velenux
velenux / ati-streams-f13.patch
Created January 11, 2011 08:10
Patch for compiling ATI Streams SDK 2.3 on Fedora 13 64bit
diff -rupN ati-stream-sdk-v2.3-lnx64/samples/opencl/cl/app/BoxFilterGL/Makefile ati-stream-sdk-v2.3-lnx64-patched/samples/opencl/cl/app/BoxFilterGL/Makefile
--- ati-stream-sdk-v2.3-lnx64/samples/opencl/cl/app/BoxFilterGL/Makefile 2010-12-07 07:27:48.000000000 +0100
+++ ati-stream-sdk-v2.3-lnx64-patched/samples/opencl/cl/app/BoxFilterGL/Makefile 2011-01-11 08:17:52.575903890 +0100
@@ -24,6 +24,8 @@ CLFILES = BoxFilterGL_Kernels.cl
IMAGES = BoxFilterGL_Input.bmp
LLIBS += SDKUtil
+LLIBS += GL
+LLIBS += GLU