This file contains hidden or 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 | |
| # Copyright 2010 Eric Ryan Harrison <me@ericharrison.info> | |
| # Inspired by: | |
| # http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/ | |
| if [ -n "$1" ] | |
| then | |
| if [ "$1" = "off" ] | |
| then | |
| tc qdisc del dev lo root |
This file contains hidden or 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
| votes CF | |
| "back in black" => { 201005211200 => '1', 201005201159 => '1', 201005201157 => '1', 201005011900 => '1', 201004190600 => '1' }, | |
| "black album" => { 201005021800 => '1', 201005010600 => '1' }, | |
| "black star" => { 201005011000 => '1' } | |
| cached_counts CF | |
| "back in black" => { 'cached_count' => 2, 'counted_until' => 201005011931 }, | |
| "black album" => { 'cached_count' => 1, 'counted_until' => 201005010600 } |
This file contains hidden or 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 'pp' | |
| class KDTree | |
| attr_reader :root | |
| attr_reader :points | |
| def initialize(points, dim) | |
| @dim = dim | |
| @root = KDNode.new(dim).parse(points) | |
| end |
This file contains hidden or 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 'rubygems' | |
| require 'spoon' | |
| Spoon.spawnp 'jruby', *ARGV |
This file contains hidden or 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
| /*************************************************************************** | |
| * Copyright (C) 2009 by Paul Lutus, Ian Clarke * | |
| * lutusp@arachnoid.com, ian.clarke@gmail.com * | |
| * * | |
| * 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; either version 2 of the License, or * | |
| * (at your option) any later version. * | |
| * * | |
| * This program is distributed in the hope that it will be useful, * |
This file contains hidden or 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
| #Pausing all but x CPU-intensive tasks | |
| PAUSEQUEUENUM=0 | |
| ACTIVEQUEUENUM=0 | |
| function putinpausequeue { | |
| kill -STOP $1 | |
| PAUSEQUEUE="$PAUSEQUEUE $1" | |
| PAUSEQUEUENUM=$(($PAUSEQUEUENUM+1)) | |
| echo "Notice. I am pausing $1 . The pause queue is now $PAUSEQUEUE" |
NewerOlder