Skip to content

Instantly share code, notes, and snippets.

View bltavares's full-sized avatar
💭
I may be slow to respond.

Bruno Tavares bltavares

💭
I may be slow to respond.
View GitHub Profile
class Example {
doSomething() {
this.a = 1;
}
}
Total
Requests: 100 - Success: 50/50% - Failure: 50/50% - Avg. Request Time: 0.0000s
Last 10 requests
Success: 50/50% - 4xx: 50/50% - 5xx: 50/50% - Timeout: 0/0% - Response Error: 0/0 - Avg. Request Time: 0.0000s
http://localhost:7125/ -> Status: 404 Not Found, time: PT0.001744371Ss
http://localhost:7125/ -> Status: 404 Not Found, time: PT0.001538671Ss
http://localhost:7125/ -> Status: 404 Not Found, time: PT0.001712489Ss
http://localhost:7125/ -> Status: 404 Not Found, time: PT0.001307738Ss
diff --git src/approx_const.rs src/approx_const.rs
index 822fbd1..731f1a4 100644
--- src/approx_const.rs
+++ src/approx_const.rs
@@ -1,5 +1,5 @@
use rustc::lint::*;
-use rustc_front::hir::*;
+use rustc::hir::*;
use std::f64::consts as f64;
use syntax::ast::{Lit, LitKind, FloatTy};
@bltavares
bltavares / override-the-gulps-to-dot.js
Last active April 5, 2016 20:45
Override Gulp to report the tasks as dot format
//var gulp = require('gulp');
var gulpBower = require('gulp-bower');
var sass = require('gulp-sass');
var eslint = require('gulp-eslint');
var react = require('gulp-react');
var browserify = require('browserify');
var fs = require('fs');
var uglify = require('gulp-uglify');
var karma = require('karma').server;
#!/bin/bash -x
help() {
echo "Usage: cleanup.sh 'path/to/a.zip' 'Name' 'Replacement'"
}
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
help
exit 1
fi
#[derive(Eq, PartialEq, Debug)]
pub struct Diff<'a> {
content: &'a str,
file_points: Box<[File<'a>]>,
}
#[derive(Eq, PartialEq, Debug)]
pub struct OwnedDiff {
content: String,
}
extern crate minifb;
use minifb::{Key, Scale};
const WIDTH: usize = 360;
const HEIGHT: usize = 360;
const PIXSIZE: usize = 4;
const PIXEL: [u32; PIXSIZE * PIXSIZE] = [
diff --git a/src/main/java/br/gov/servicos/editor/git/RepositorioGit.java b/src/main/java/br/gov/servicos/editor/git/RepositorioGit.java
index ef92041..65b7e5f 100644
--- a/src/main/java/br/gov/servicos/editor/git/RepositorioGit.java
+++ b/src/main/java/br/gov/servicos/editor/git/RepositorioGit.java
@@ -7,14 +7,19 @@ import lombok.experimental.FieldDefaults;
import lombok.experimental.NonFinal;
import lombok.extern.slf4j.Slf4j;
import net.logstash.logback.marker.LogstashMarker;
-import org.eclipse.jgit.api.*;
+import org.eclipse.jgit.api.Git;
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index 31b881b..0879918 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -576,7 +576,14 @@ pub fn set_print(sink: Box<Write + Send>) -> Option<Box<Write + Send>> {
issue = "0")]
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
- let result = LOCAL_STDOUT.with(|s| {
+ result = _try_print(args);
fn bottles(x : u8) -> String {
match x {
0 => String::from("no more bottles"),
1 => String::from("1 bottle"),
y => format!("{} bottles", y),
}
}
fn phrase(x : u8) -> String {
format!("{current} of beer on the wall