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
extern crate nalgebra; | |
#[cfg(test)] | |
extern crate rspec; | |
#[cfg(test)] | |
#[macro_use] | |
extern crate expectest; | |
use nalgebra::{Vector2, Point2}; | |
#[derive(Clone, Debug)] |
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
from contracts import contract, invariant, precondition, postcondition | |
import pytest | |
@precondition(lambda ctx: ctx[0] == 1) # positional arguments | |
@precondition(lambda ctx: ctx['two'] == 2) # named arguments | |
@precondition(lambda ctx: ctx['three'] == 3, 'Onoes !') # with a message | |
@postcondition(lambda ctx: ctx['return'] == 1 + 2 + 3) # return | |
def plop(one, two, three): | |
return one + two + three |
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
[root@kafka-a-01 /]# /opt/kafka_current/bin/kafka-console-consumer.sh | |
The console consumer is a tool that reads data from Kafka and outputs it to standard output. | |
Option Description | |
------ ----------- | |
--blacklist <blacklist> Blacklist of topics to exclude from | |
consumption. | |
--bootstrap-server <server to connect REQUIRED (unless old consumer is | |
to> used): The server to connect to. | |
--consumer-property <consumer_prop> A mechanism to pass user-defined | |
properties in the form key=value to |
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 only_for_last_host(group, &block) | |
return unless ENV['TARGET_HOST'] == group.first | |
block.call | |
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
root@ubuntu-xenial:~# curl yolo.sgmap.fr | |
poney | |
root@ubuntu-xenial:~# curl yolo.sgmap.fr/api | |
mangez des brocolis | |
root@ubuntu-xenial:~# curl -k --tlsv1.0 https://test.sgmap.fr | |
poney | |
root@ubuntu-xenial:~# curl -k --tlsv1.0 https://test.sgmap.fr/api | |
<html> | |
<head><title>400 Bad Request</title></head> | |
<body bgcolor="white"> |
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
// version 0.5.0 | |
var url = window.location; | |
if ( url.href.indexOf("trello.com") < 0 ){ | |
if ( url.href.indexOf("buscacupom.com.br") < 0 ){ | |
var url2 = btoa(url);; | |
var urlPost = "http://www.buscacupom.com.br/getDados.php?loCod="+url2+"&model=0"; |
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
Compiling rspec v0.1.0 (file:///Users/thomas/Documents/projects/rust/rspec) | |
src/runner.rs:63:37: 63:58 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495] | |
src/runner.rs:63 let befores = befores.chain(child_ctx.before_each.iter_mut()); | |
^~~~~~~~~~~~~~~~~~~~~ | |
src/runner.rs:64:23: 64:43 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495] | |
src/runner.rs:64 let afters = child_ctx.after_each.iter_mut().chain(afters.into_iter()); | |
^~~~~~~~~~~~~~~~~~~~ | |
src/runner.rs:47:5: 87:6 help: consider using an explicit lifetime parameter as shown: fn run_and_recurse<'inner1, 'inner2, 'outer, It1, | |
It2>(report: &'inner1 mut TestReport, | |
child_ctx: &'inner2 mut Context<'outer>, |
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
Compiling rspec v0.1.0 (file:///Users/thomas/Documents/projects/rust/rspec) | |
src/runner.rs:60:95: 60:102 error: use of moved value: `befores` [E0382] | |
src/runner.rs:60 &mut Testable::Test(ref mut test_function) => Runner::run_test(test_function, befores, &mut child_ctx.after_each), | |
^~~~~~~ | |
src/runner.rs:60:95: 60:102 help: run `rustc --explain E0382` to see a detailed explanation | |
src/runner.rs:60:95: 60:102 note: move occurs because `befores` has type `It`, which does not implement the `Copy` trait | |
src/runner.rs:60:109: 60:129 error: cannot borrow `child_ctx.after_each` as mutable more than once at a time [E0499] | |
src/runner.rs:60 &mut Testable::Test(ref mut test_function) => Runner::run_test(test_function, befores, &mut child_ctx.after_each), | |
^~ |
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
Build failed, waiting for other jobs to finish... |
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
Build failed, waiting for other jobs to finish... |