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
namespace eval Spec { | |
namespace eval Mocks { | |
nx::Class create MessageExpectation { | |
:property method_name:required | |
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 "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") } |
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
$ rake test | |
Run options: --seed 60793 | |
# Running tests: | |
..........E.................................................................................... | |
Finished tests in 5.710699s, 16.6354 tests/s, 35.7224 assertions/s. | |
1) Error: |
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 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) |
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
(sql\srun|fsqlFetch\s\{[^\}]+\})\s"[^"\$]+\$[^"]+" |
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
proxied_git () | |
( | |
export GIT_PROXY_COMMAND=/tmp/gitproxy; | |
cat > $GIT_PROXY_COMMAND <<EOF |
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
<?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 | |
?> |
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
<?php | |
$server = 'localhost'; | |
$user = 'root'; | |
$password = ''; | |
$connect = mysql_connect(__,__,__); | |
$sql = '___________'; | |
mysql_select_db(____,$connect); | |
$result = mysql_query(____); | |
mysql_close(_____); |
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
if ($status == 1) { | |
echo 'es geht mir gut' | |
} | |
elseif ($status == 10) { | |
echo 'es geht mir nicht gut' | |
} | |
else { | |
echo 'es geht mir solala' | |
} |
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
<?php | |
// 1 | |
$server = 'localhost'; | |
$user = 'root'; | |
$password = ''; | |
// 2 | |
$connect = mysql_connect($server,$user,$password); | |
$sql = 'SELECT * FROM Lieblingsspieler WHERE Land = Frankreich'; |