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
<?php | |
App::uses('PaginatorHelper','View/Helper'); | |
class CustomPaginatorHelper extends PaginatorHelper { | |
public function numbers($options = array()) { | |
if ($options === true) { | |
$options = array( | |
'before' => ' | ', 'after' => ' | ', 'first' => 'first', 'last' => 'last' | |
); |
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
43a44 | |
> processor.logger.debug("Adjusted stack depth: " + stackDepth.to_s) | |
88c89,93 | |
< val = eval(name, the_binding) | |
--- | |
> s_name = name.inspect | |
> if s_name[0] == ":" | |
> s_name = s_name[1..-1] | |
> end | |
> val = eval(s_name, the_binding) |
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
3249,3250c3249 | |
< _eval_optlist = [['i','transaction_id', int, 1, -1, None], | |
< ['l','length', int, 1, 0, None]] | |
--- | |
> _eval_optlist = [['i','transaction_id', int, 1, -1, None]] | |
3252c3251 | |
< (tid, data_length, data,) = self._getopts(cmdargs, self._eval_optlist, "eval") | |
--- | |
> (tid, data,) = self._getopts(cmdargs, self._eval_optlist, "eval") | |
3268,3269c3267,3268 |
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
["echo",["run_test_files",["spec/conductor_spec.rb","spec/observer_set_spec.rb","spec/event_spec.rb","spec | |
/test_event_spec.rb","spec/echo_event_spec.rb","spec/reader_spec.rb","spec/status_change_event_spec.rb","s | |
pec/pass_or_fail_event_spec.rb","spec/event_parser_spec.rb","spec/listener_spec.rb"]]] | |
["echo",["test","spec/conductor_spec.rb",[]]] | |
["echo",["test","spec/conductor_spec.rb",[],"spec/conductor_spec.rb.log",1]] | |
["test","spec/conductor_spec.rb",[],"spec/conductor_spec.rb.log",1] | |
["echo",["test","spec/observer_set_spec.rb",[]]] | |
["echo",["test","spec/observer_set_spec.rb",[],"spec/observer_set_spec.rb.log",0]] | |
["test","spec/observer_set_spec.rb",[],"spec/observer_set_spec.rb.log",0] | |
["echo",["test","spec/event_spec.rb",[]]] |
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
:VdebugOpt | |
setting debug_file | |
behaves like a vdebug option | |
the resulting option value | |
should == "path/to/file.log" | |
setting debug_file_level | |
behaves like a vdebug option | |
the resulting option value | |
should == "2" | |
setting debug_window_level |
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
iterations = 0 | |
payloads = (1..1000).to_a | |
threads = [] | |
threads << Thread.new do | |
200.times do | |
add_num = rand(1000..2000) | |
puts "\nAdding #{add_num} to payload" | |
payloads << add_num | |
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
options = [:hit, :miss, :unknown].cycle | |
Array.new(10) { Array.new(10) { |v| options.next } } |
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 'cinch' | |
class Cinch::Plugins::WordGame | |
include Cinch::Plugin | |
match(/word start/, method: :start) | |
def start(m) | |
@word = DictionaryWord.new("/etc/dictionaries-common/words") | |
@guesses = 0 | |
m.reply "Starting a new word game. Make a guess." |
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
#!/bin/bash | |
export XDEBUG_CONFIG="idekey=xdebug" | |
/usr/bin/php "$@" |
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
def flatten_keys(hsh, keys) | |
keys.each_with_object([]) { |k, result| | |
result += hsh[k] | |
} | |
end | |
def flatten_keys_each(hsh, keys) | |
result = [] | |
keys.each { |k| | |
result += hsh[k] |
OlderNewer