$ gem install rspec
$ rspec --color --format=d register.rb
CashRegister
when empty
items
$ ab -n 1000 http://localhost:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
% cumulative self self total | |
time seconds seconds calls ms/call ms/call name | |
------------------------------------------------------------ | |
10.98 277.26 104.33 30721151 0.00 0.01 Hash#find_entry | |
9.58 116.29 91.02 36303266 0.00 0.00 Hash::Entry#match? | |
9.51 141.50 90.35 29760101 0.00 0.00 String#<< | |
5.52 501.94 52.41 9920000 0.01 0.05 Hexdump::Dumper::print<330> {} | |
4.72 949.77 44.83 12 3735.59 79147.48 String#each_byte | |
4.70 345.50 44.70 9920000 0.00 0.03 Hexdump::Dumper::each<279> {} | |
4.18 321.67 39.69 30721093 0.00 0.01 Hash#[] |
require 'thor' | |
require 'thor/actions' | |
module DataMapper | |
module Gen | |
class CLI < Thor | |
include Thor::Actions | |
DM_VERSION = '1.0' |
module Test | |
def Test.mytest | |
end | |
end | |
Test.methods(false) | |
# => ["mytest"] | |
Test.method_defined?("mytest") | |
# => false |
$(function() { | |
var $slides = $("#slides"); | |
var $currentSlide = null; | |
function newSlide() { | |
$currentSlide = $('<div class="slide"></div>') | |
$currentSlide.appendTo($slides); | |
} | |
newSlide(); |
module DataMapper | |
class Collection | |
# | |
# EagerLoader takes a QueryPath object and loads all relationships | |
# referenced in the path, into an existing Collection. | |
# | |
# Using eager-loading allows you to optimize out the classic "n+1" | |
# query problem, when you intend to iterate over several arbitrarily deeply | |
# nested relationships. One query per relationship is executed, | |
# vs one query per record. |
require 'ronin/code/asm' | |
require 'ronin/formatting/binary' | |
program = Ronin::Code.asm(:arch => :x86) do | |
xor eax, eax | |
push eax | |
push 0x68732f2f | |
push 0x6e69622f | |
mov esp, ebx | |
push eax |
#!/usr/bin/env ronin-payload -f | |
require 'ronin/payloads/shellcode' | |
Ronin::Payloads::Shellcode.object do | |
cache do | |
self.name = 'local_shell' | |
self.description = %{ | |
Shellcode that spawns a local /bin/sh shell |