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
module Burst | |
class MailingList | |
include Typhoeus | |
DEFAULT_KEY = 'SECRET' | |
DEFAULT_HOST = '127.0.0.1' | |
DEFAULT_PORT = 3000 | |
remote_defaults :on_success => lambda {|response| Yajl::Parser.parse(response.body)}, | |
:on_failure => lambda {|response| raise "Error code: #{response.code}"}, | |
:base_uri => "http://" |
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
smtp = Net::SMTP.start('127.0.0.1', 25) | |
Mail.defaults do | |
delivery_method :smtp_connection, :connection => smtp | |
end | |
mail1 = Mail.deliver do | |
from '[email protected]' | |
to '[email protected], [email protected]' | |
subject 'invalid RFC2822' |
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
# From: https://github.com/orionz/minion/blob/master/lib/minion.rb | |
... | |
def run | |
log "Starting minion" | |
Signal.trap('INT') { AMQP.stop{ EM.stop } } | |
Signal.trap('TERM'){ AMQP.stop{ EM.stop } } |
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 | |
# ^^ Replace with an RVM wrapper if RVM is to be used. | |
require "bundler/setup" | |
require 'methadone' | |
require "etc" | |
# Lambda for init script to fork into new daemon | |
STARTUP = labmda{ Verify::Pool.new(:environment => env).start } |
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 | |
# How about an awesome command-line script | |
# that replaces your usage of "awk -F, ..." | |
# for like 99% of cases. | |
# | |
# Also, importantly, it supports CSV features | |
# like escaping commas when quoted | |
# | |
# Usage: csv.rb [options] <filename> |
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
Full thread dump OpenJDK 64-Bit Server VM (19.0-b09 mixed mode): | |
"Thread-2" daemon prio=10 tid=0x00007fa6f4242000 nid=0x16fe in Object.wait() [0x00007fa6f8c09000] | |
java.lang.Thread.State: TIMED_WAITING (on object monitor) | |
at java.lang.Object.wait(Native Method) | |
- waiting on <0x00000000f7511728> (a java.lang.Object) | |
at org.jruby.util.ShellLauncher$StreamPumper.run(ShellLauncher.java:1329) | |
- locked <0x00000000f7511728> (a java.lang.Object) | |
"Thread-1" daemon prio=10 tid=0x00007fa6f4240000 nid=0x16fd runnable [0x00007fa6f8e0a000] |
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
Linux version 2.6.31.7 (mitch@home) (gcc version 4.1.2) #1 Sat Dec 19 13:00:37 GST 2009 | |
KERNEL supported cpus: | |
Intel GenuineIntel | |
AMD AuthenticAMD | |
NSC Geode by NSC | |
Cyrix CyrixInstead | |
Centaur CentaurHauls | |
Transmeta GenuineTMx86 | |
Transmeta TransmetaCPU | |
UMC UMC UMC UMC |
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
aa_associations (0.1.1) lib/active_admin_associations/active_admin_extensions.rb:10:in `map' | |
aa_associations (0.1.1) lib/active_admin_associations/active_admin_extensions.rb:10:in `resources' | |
aa_associations (0.1.1) app/helpers/active_admin_associations_helper.rb:41:in `resource_administrated?' | |
aa_associations (0.1.1) app/views/admin/shared/_add_to_association.html.erb:1:in `___olumes__torage__sers_spiegela__rvm_gems_ruby_______p____gems_aa_associations_______app_views_admin_shared__add_to_association_html_erb___1430324781899361445_70241541638800' | |
actionpack (3.2.8) lib/action_view/template.rb:145:in `block in render' | |
activesupport (3.2.8) lib/active_support/notifications.rb:125:in `instrument' | |
actionpack (3.2.8) lib/action_view/template.rb:143:in `render' | |
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:265:in `render_partial' | |
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:238:in `block in render' | |
actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `block in |
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 'java' | |
require 'scala-library.jar' | |
require 'config-1.0.0.jar' | |
require 'akka-actor_2.10-2.1.0.jar' | |
java_import 'java.io.Serializable' | |
java_import 'akka.actor.UntypedActor' | |
java_import 'akka.actor.ActorRef' |
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 'faraday' | |
require 'zlib' | |
module FaradayMiddleware | |
class Gzip < Faraday::Response::Middleware | |
def on_complete(env) | |
return unless env[:body].is_a? String | |
encoding = env[:response_headers]['content-encoding'].to_s.downcase | |
case encoding |
OlderNewer