Skip to content

Instantly share code, notes, and snippets.

View PragTob's full-sized avatar
💔
Close friend just died. Limited availability.

Tobias Pfeiffer PragTob

💔
Close friend just died. Limited availability.
View GitHub Profile
require 'benchmark/ips'
class FakeDimension
def initialize
@margin_start = 10
@margin_start_relative = false
end
def relative?(result)
result.is_a?(Float) && result <= 1
@PragTob
PragTob / rake_spec_jruby_head
Created February 1, 2015 10:39
shoes rake spec on jruby-head
tobi@airship ~/github/shoes4 $ time rake spec
jruby --debug --1.9 -Ispec -S rspec --tty -rshoes-core/spec/spec_helper shoes-core/spec/shoes/point_spec.rb shoes-core/spec/shoes/keyrelease_spec.rb shoes-core/spec/shoes/constants_spec.rb shoes-core/spec/shoes/app_spec.rb shoes-core/spec/shoes/star_spec.rb shoes-core/spec/shoes/packager_spec.rb shoes-core/spec/shoes/image_spec.rb shoes-core/spec/shoes/input_box_spec.rb shoes-core/spec/shoes/text_block_dimensions_spec.rb shoes-core/spec/shoes/renamed_delegate_spec.rb shoes-core/spec/shoes/border_spec.rb shoes-core/spec/shoes/text_block_spec.rb shoes-core/spec/shoes/keypress_spec.rb shoes-core/spec/shoes/oval_spec.rb shoes-core/spec/shoes/internal_app_spec.rb shoes-core/spec/shoes/shape_spec.rb shoes-core/spec/shoes/radio_spec.rb shoes-core/spec/shoes/font_spec.rb shoes-core/spec/shoes/list_box_spec.rb shoes-core/spec/shoes/dimensions_spec.rb shoes-core/spec/shoes/animation_spec.rb shoes-core/spec/shoes/link_spec.rb shoes-core/spec/shoes/widget_spec.rb shoes-core
@PragTob
PragTob / istask11.rb
Created December 8, 2014 17:46
#myfirstrubyscript
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
#
# This exploit affects the debian Linuxmachine from our IS Special task.
#
include Exploit::Remote::Tcp
def initialize(info = {})
@PragTob
PragTob / gist:756ad5684c8dc47e5f2c
Created November 14, 2014 11:56
Shoes rubocop offense 14/11/2014
Inspecting 160 files
..CCWCCCCWWCCWCWCW.CCC.CCWCCCCCCCCCC.CCCCCCCCCCCCCCCCWCWCCCCCCCCCWC.C.CCCCCCCCCWCCCCCCCCCCCCCCCCCCCCCCWCCCWCW.WCCCCCCCC..CCCWCW.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
Offenses:
lib/shoes/dsl.rb:5:1: C: Style/Documentation: Missing top-level class documentation comment.
class Shoes
^^^^^
lib/shoes/dsl.rb:34:81: C: Metrics/LineLength: Line is too long. [101/80]
$stderr.puts "WARN: The Shoes.setup method is deprecated, you need to install gems yourself." \
@PragTob
PragTob / shoes_r_rubocop_utofix
Created October 29, 2014 10:53
Shoes 4 rubocop autofix report
Inspecting 164 files
WCWCCWWCCCWWWCCWCCCWWWCWWCCWCWCWWCCCCWCWWWWWCCWWWWWCWWWWWWWWWCWWWWCWCCCWCC.CCCCCCCCC.CCWCC.CCWCWCCCWCWWCWWCCCWWWCWWCCWWCCCWCWCCWCWCCC.CCCWCCW.CCWCCCCC.CCCCW.CCCCW.W
Offenses:
lib/ext/highlighter/common.rb:3:1: C: Missing top-level module documentation comment.
module HH::Syntax
^^^^^^
lib/ext/highlighter/common.rb:3:8: C: Use nested module/class definitions instead of compact style.
module HH::Syntax
@PragTob
PragTob / shoes4_rubocop_report
Created October 29, 2014 10:50
Shoes 4 rubocop report
Inspecting 164 files
WCWCCWWCCCWWWCCWCCCWWWCWWCCWCWCWWCCCCWCWWWWWCCWWWWWCWWWWWWWWWCWWWWCWCCCWCC.CCCCCCCCC.CCWCC.CCWCWCCCWCWWCWWCCCWWWCWWCCWWCCCWCWCCWCWCCC.CCCWCCW.CCWCCCCC.CCCCW.CCCCW.W
Offenses:
lib/ext/highlighter/common.rb:3:1: C: Missing top-level module documentation comment.
module HH::Syntax
^^^^^^
lib/ext/highlighter/common.rb:3:8: C: Use nested module/class definitions instead of compact style.
module HH::Syntax
@PragTob
PragTob / segfault_log
Created September 8, 2014 19:54
SWT 4.4 error for shoes4
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f2696aba4f9, pid=2161, tid=139807017760512
#
Inspecting 164 files
WCWCCWWCCCWWCCWCCCWWWCWWCCWCWCWCCCCCWCWWWWWCCWWWWWCWWWWWWWWWCWWWWCWCCCWCC.CCCCCCCCCC.CCCWCC.CCCCWCCCWCWWCWWCCCCWWCWWCWWCCCWWWCCWCWCCC.CWCWCCW.CCWCCCC.CCCCCW.CCCCW.W
Offenses:
lib/ext/highlighter/common.rb:3:1: C: Missing top-level module documentation comment.
module HH::Syntax
^^^^^^
lib/ext/highlighter/common.rb:3:8: C: Use nested module/class definitions instead of compact style.
module HH::Syntax
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RailsGirlsApp</title>
<link data-turbolinks-track="true" href="/assets/application.css" media="all" rel="stylesheet" />
<script data-turbolinks-track="true" src="/assets/application.js"></script>
</head>
<body>