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 XMLRPC::Client | |
def set_debug | |
@http.set_debug_output($stderr); | |
end | |
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
# StringSanitizer | |
# | |
# All the methods are recursive, which means that it will visit all the nodes of your data structure | |
# and converts all no-valid utf-8 strings to valid utf-8. | |
# It will also remove leading whitespace from the given string. | |
# | |
# This class currently supports recursive UTF-8 conversion in the following types: String, Array and Hash. | |
# | |
class StringSanitizer |
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
# encoding: UTF-8 | |
require 'open-uri' | |
class GenderReportPdf < Prawn::Document | |
def initialize(mens, womans) | |
super(top_margin: 70) | |
add_title | |
@mens = mens | |
@womans = womans | |
add_count |
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 'spec_helper' | |
include Warden::Test::Helpers | |
describe "UserDashboards" do | |
before(:each) do | |
@user = Factory.create(:user) | |
login_as @user, :scope => :user | |
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
#!/usr/bin/perl | |
# synSpoofFlood | |
# Author: Lucas Allan | |
# | |
# Based on Simple SYN Flooder by iphelix | |
# Requires perl, Net::RawIP module, and root privileges | |
# | |
# www.lucasallan.com | |
# |
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
- Ruby under a microcospe | |
- Programming Elixir | |
- Deploying JRuby (Done) | |
- The Joy of Clojure |
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
class BryanCranston < Concurrent::Actor | |
end | |
class Bryan < Concurrent::Actor | |
end | |
# EXAMPLE 01 | |
### server | |
server = Concurrent::ActorServer.new([BryanCranston.new, Bryan.new], 'localhost', 8888) | |
server.run! |
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
repository 'http://repo1.maven.org/' | |
local_repo 'lib/java' | |
jar 'com.netflix.astyanax:astyanax-core:1.56.48' | |
jar 'com.netflix.astyanax:astyanax-thrift:1.56.48' | |
jar 'com.netflix.astyanax:astyanax-cassandra:1.56.48' |
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
#JRuby without custom configuration: | |
>$ time rake -T | |
36.69s user 1.48s system 282% cpu 13.524 total | |
# Disable invokedynamic and Tiered compilation (64-bit) | |
>$ export JAVA_OPTS='-Djruby.compile.mode=OFF -XX:+TieredCompilation -XX:TieredStopAtLevel=1' | |
>$ export JRUBY_OPTS='-Xcompile.invokedynamic=false' | |
>$ rake -T |
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 'java' | |
java_import 'java.util.concurrent.FutureTask' | |
java_import 'java.util.concurrent.Executors' | |
class JavaFuture | |
class Callable | |
def initialize(block) | |
@block = block | |
end |