Skip to content

Instantly share code, notes, and snippets.

View mackwic's full-sized avatar
💭
I may be slow to respond, sorry for that.

Thomas Wickham mackwic

💭
I may be slow to respond, sorry for that.
View GitHub Profile
extern crate nalgebra;
#[cfg(test)]
extern crate rspec;
#[cfg(test)]
#[macro_use]
extern crate expectest;
use nalgebra::{Vector2, Point2};
#[derive(Clone, Debug)]
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
[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
def only_for_last_host(group, &block)
return unless ENV['TARGET_HOST'] == group.first
block.call
end
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">
// 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";
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>,
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),
^~
Build failed, waiting for other jobs to finish...
Build failed, waiting for other jobs to finish...