Skip to content

Instantly share code, notes, and snippets.

View hallelujah's full-sized avatar

Ramihajamalala Hery hallelujah

View GitHub Profile
[i] hery@hallelujah ~/Devel/3scale/porta (fix-cukes●)$ RAILS_ENV=test parallel_cucumber --verbose features -o "-b -p parallel --tags=@javascript --tags=~@fakeweb --tags=~@percy" [2.3]
8 processes for 278 features, ~ 34 features per process
bin/cucumber --format ParallelTests::Gherkin::RuntimeLogger --out tmp/parallel_runtime_cucumber.log -b -p parallel --tags=@javascript --tags=~@fakeweb --tags=~@percy features/developer_portal/signup.feature features/old/access_code.feature features/old/api/features.feature features/old/api/latest_transactions.feature features/old/api/metrics/deletion.feature features/old/api/plans/account_plans.feature features/old/api/plans/default_plan.feature features/old/api/plans/plan.feature features/old/api/usage_limits.feature features/old/applications/buyers/referrer_filters/buyer_side_single_application.feature features/old/authentication/internal.feature features/old/authorization/provider_plans
@hallelujah
hallelujah / superhook.rb
Last active August 23, 2017 10:47
super-hook
module PaymentDetails
def hello
puts 'Simple'
end
module Multi
def hello
puts 'Multi'
end
@hallelujah
hallelujah / activity.rb
Created January 26, 2017 15:59
acitivity.rb
class Data
class << self
def all
(1..10).to_a
end
def created
[4, 5, 6, 8, 9]
@hallelujah
hallelujah / krakener.lua
Created March 13, 2016 23:41
kraken can spawn only once
function Krakener:CanSpawn(ignore_cooldown)
return (self:TimeUntilCanSpawn() <= 0 or ignore_cooldown) and not self.kraken and self.spawn_chance_mod > 0.0
end
--[[
This means that the quacken can sapwn if and only if all those conditions are met:
* cooldown is 0 (you did not spawn the quaken recently)
* there is no quacken in the world
@hallelujah
hallelujah / init.as
Created November 5, 2013 18:30
A sample of how to handle ID.net SDK on Flash
import net.id.api.IDnet;
import net.id.api.core.IDnetURLDefaults;
import net.id.api.data.IDnetAuthResponse;
private var appId:String;
private function setAppIdAndInit(e:Event):void
{
var xml:XML = new XML(e.target.data);
setAppId(xml.appId);
@hallelujah
hallelujah / numpad.vim
Created March 20, 2013 14:54
Vim numpad file
map <Esc>Oy 9
map! <Esc>Oy 9
map <Esc>Ox 8
map! <Esc>Ox 8
map <Esc>Ow 7
map! <Esc>Ow 7
map <Esc>Ov 6
map! <Esc>Ov 6
map <Esc>Ou 5
map! <Esc>Ou 5
@hallelujah
hallelujah / create_view.groovy
Created December 14, 2011 15:52
Jenkins Hudson groovy script to create a view in BuildPipeline Plugin
// Use in jenkins v 1.443 and BuildPipeline Plugins version 1.2.3
import hudson.model.*
import hudson.views.*
import au.com.centrumsystems.hudson.plugin.buildpipeline.*
restrict_trigger_to_recent = false
v = new BuildPipelineView("view_name", "view_title", "initial_job_name", "number_of_display_builds", restrict_trigger_to_recent)
Hudson.instance.addView(v)
@hallelujah
hallelujah / gist:777988
Created January 13, 2011 15:03
participant_list.json
/*ruote_work_development/configurations/st/participant_list.json */
{"type":"configurations","_id":"participant_list","list":[["^log_me$","inpa_:log_me"],["^ping$",["RuoteAMQP::Participant",{"queue":"ping","reply_queue":"ruote_workitems"}]],["^pong$",["RuoteAMQP::Participant",{"queue":"pong","reply_queue":"ruote_workitems"}]],["^.+$",["Ruote::StorageParticipant",{}]]],"put_at":"2011-01-13 15:02:45.717461 UTC","_rev":7}
@hallelujah
hallelujah / gist:777917
Created January 13, 2011 14:19
RuoteKit Config for my Rails application
# make changes when needed
#
# you may use another persistent storage for example or include a worker so that
# you don't have to run it in a separate instance
#
# See http://ruote.rubyforge.org/configuration.html for configuration options of
# ruote.
require 'ruote/storage/fs_storage'
diff --git a/lib/gettext_i18n_rails/backend.rb b/lib/gettext_i18n_rails/backend.rb
index b27344b..2932262 100644
--- a/lib/gettext_i18n_rails/backend.rb
+++ b/lib/gettext_i18n_rails/backend.rb
@@ -20,7 +20,7 @@ module GettextI18nRails
_(flat_key)
else
if self.class.translate_defaults
- options[:default].to_a.each do |default|
+ Array.wrap(options[:default]).each do |default|