Skip to content

Instantly share code, notes, and snippets.

View arthurschreiber's full-sized avatar

Arthur Schreiber arthurschreiber

View GitHub Profile
$:.unshift File.join(File.dirname(__FILE__), "lib")
require "rugged"
repo = Rugged::Repository.new(".")
10000000.times do
begin
Rugged::Reference.each(repo) do |ref|
raise "fail"
end
class RepositoryThreadedPushTest < Rugged::SandboxedTestCase
def setup
super
sandbox_init("testrepo.git")
@repos = (1..10).collect do |i|
sandbox_clone("testrepo.git", "testrepo#{i}.git").tap { |r| r.config['core.bare'] = true }
sandbox_clone("testrepo#{i}.git", "testrepo#{i}")
end
namespace eval Spec {
namespace eval Mocks {
nx::Class create MessageExpectation {
:property method_name:required
require "benchmark/ips"
$LOAD_PATH.unshift("./lib")
require "rugged"
Benchmark.ips do |x|
# Typical mode, runs the block as many times as it can
x.report("Rugged::Repository.open") { Rugged::Repository.open("test/fixtures/testrepo.git") }
$ rake test
Run options: --seed 60793
# Running tests:
..........E....................................................................................
Finished tests in 5.710699s, 16.6354 tests/s, 35.7224 assertions/s.
1) Error:
module YARD
module CodeObjects
module Tcl
class NamespaceObject < CodeObjects::Base
attr_writer :resolution_path
attr_reader :children
def initialize(namespace, name, *args, &block)
@children = CodeObjectList.new(self)
(sql\srun|fsqlFetch\s\{[^\}]+\})\s"[^"\$]+\$[^"]+"
proxied_git ()
(
export GIT_PROXY_COMMAND=/tmp/gitproxy;
cat > $GIT_PROXY_COMMAND <<EOF
<?php
$arr = array(1, 2, 3, 4);
foreach ($arr as &$value) {
$value = $value * 2;
}
// $arr is now array(2, 4, 6, 8)
unset($value); // break the reference with the last element
?>
<?php
$server = 'localhost';
$user = 'root';
$password = '';
$connect = mysql_connect(__,__,__);
$sql = '___________';
mysql_select_db(____,$connect);
$result = mysql_query(____);
mysql_close(_____);