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 ruby | |
require 'yaml' | |
(puts 'usage: wtf <acronym>';exit) unless ARGV.size > 0 | |
y= YAML.load(File.read(File.join(File.dirname(__FILE__), 'wtf.dict'))) | |
ARGV.each do |arg| | |
puts "search for #{arg}:" | |
f = y.keys.grep(/#{arg}/i) | |
f.each { |k| puts " #{k}: #{y[k]}" } |
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 | |
function die | |
{ | |
echo "$1" >&2 | |
exit 1 | |
} | |
if [ $# -ne 1 ]; then | |
die "usage: $(basename $0) [package name]" |
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
%w(open-uri hpricot).each { |lib| require lib } | |
BASEURL = "http://www.rubyusers.com" | |
puts Hpricot(open("#{BASEURL}/users/list")).search("//li[@class^='size_']/a").map { |a| | |
[a.inner_text, Hpricot(open("#{BASEURL}#{a[:href]}")).search("//p/li").size] | |
}.sort_by{|e|e[1]}.reverse.map{|e|e*': '} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
void prim(int n) | |
{ | |
if(n<2) return; | |
printf("2, "); | |
if(n==2) return; | |
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 ruby | |
require 'rubygems' | |
require 'lib/jabbot' | |
configure do |conf| | |
conf.login = 'geheim@server' | |
conf.channel = 'spamalot' | |
conf.server = 'conference.server' | |
conf.password = 'noch_geheimer' |
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
#define BLACK "\033[22;30m" | |
#define RED "\033[22;31m" | |
#define GREEN "\033[22;32m" | |
#define BROWN "\033[22;33m" | |
#define BLUE "\033[22;34m" | |
#define MAGENTA "\033[22;35m" | |
#define CYAN "\033[22;36m" | |
#define GRAY "\033[22;37m" | |
#define DARKGRAY "\033[01;30m" |
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
void print_color(char *fontcolor, char *fmt, ...) | |
{ | |
va_list list; | |
char msg[1024]; | |
va_start(list, fmt); | |
vsprintf(msg, fmt, list); | |
va_end(list); | |
_printf(fontcolor); |
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 "core.php"; | |
function errorExit($message) | |
{ | |
header("Content-type: text/xml"); | |
echo <<<EOF | |
<?xml version="1.0" encoding="utf-8"?> | |
<response> | |
<error>1</error> |
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 vm/codegen/field_extract.rb vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/block_environment.hpp vm/builtin/bytearray.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/class.hpp vm/builtin/compiledmethod.hpp vm/builtin/data.hpp vm/builtin/dir.hpp vm/builtin/exception.hpp vm/builtin/float.hpp vm/builtin/immediates.hpp vm/builtin/iseq.hpp vm/builtin/list.hpp vm/builtin/lookuptable.hpp vm/builtin/memorypointer.hpp vm/builtin/methodtable.hpp vm/builtin/nativefunction.hpp vm/builtin/regexp.hpp vm/builtin/selector.hpp vm/builtin/sendsite.hpp vm/builtin/staticscope.hpp vm/builtin/string.hpp vm/builtin/symbol.hpp vm/builtin/thread.hpp vm/builtin/tuple.hpp vm/builtin/compactlookuptable.hpp vm/builtin/time.hpp vm/builtin/methodvisibility.hpp vm/builtin/taskprobe.hpp vm/builtin/nativemethod.hpp vm/builtin/system.hpp vm/builtin/autoload.hpp vm/builtin |
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
1) | |
Math.atanh raises an Errno::EDOM if x = 1.0 FAILED | |
Expected EDOM | |
but got ERANGE (Numerical result out of range - Numerical result out of range) | |
#<Object:0x1f936>.__script__ {} at spec/frozen/core/math/atanh_spec.rb:30 | |
Kernel(Object)#instance_eval at kernel/common/eval.rb:117 | |
Enumerable(Array)#all? {} at kernel/common/enumerable.rb:266 | |
Array#each at kernel/bootstrap/array_186.rb:9 | |
Enumerable(Array)#all? at kernel/common/enumerable.rb:266 | |
Array#each at kernel/bootstrap/array_186.rb:9 |