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
function RacerGoToDefinition() | |
let current_line = line(".") | |
let current_column = col(".") | |
let current_file = expand("%") | |
let command = g:racer_cmd." find-definition ".current_line." ".current_column." ".current_file | |
let definition = system(command) | |
let matches = split(split(definition, "\n")[0], ",") | |
if split(matches[0], " ")[0] != "MATCH" |
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
### Keybase proof | |
I hereby claim: | |
* I am zmack on github. | |
* I am zmack (https://keybase.io/zmack) on keybase. | |
* I have a public key whose fingerprint is AC46 AEDB 6BFE 3F87 8065 5A3A CEC1 A6BC 8709 DF7D | |
To claim this, I am signing this object: |
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
impl Operation for Bar { | |
fn add(&self, other: int) { | |
} | |
} | |
impl OtherOperation for Bar { | |
fn zero(&self) -> uint { | |
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
#[deriving(Show,Clone)] | |
enum DiskStruct { | |
File(String), | |
Dir(String) | |
} | |
impl DiskStruct { | |
fn new(path: &str) -> DiskStruct { | |
match path.slice_from(path.len()-1) { | |
"/" => DiskStruct::Dir(path.to_string()), |
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
use std::io::fs; | |
use std::io::fs::PathExtensions; | |
use std::io::net::pipe::UnixListener; | |
use std::io::{Acceptor,Listener}; | |
use std::string::String; | |
fn main() { | |
let socket = Path::new("server.sock"); | |
let mut buffer = String::with_capacity(1024); |
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
Index: net/instaweb/rewriter/rewrite_context.cc | |
=================================================================== | |
--- net/instaweb/rewriter/rewrite_context.cc (revision 4146) | |
+++ net/instaweb/rewriter/rewrite_context.cc (working copy) | |
@@ -962,7 +962,7 @@ | |
handler_->Message( | |
kInfo, "Deadline exceeded for rewrite of resource %s with %s.", | |
input->url().c_str(), rewrite_context_->id()); | |
- FetchFallbackDoneImpl(input->contents(), input->response_headers()); | |
+ FetchFallbackDoneImpl(input->contents(), input->response_headers(), true); |
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
(print [1 2 3 4 5]) | |
(seq {:a 1 :b 2}) | |
((fn foo [x] (when (> x 0) (conj (foo (dec x)) x))) 5) | |
(seq (reverse (range 1 6))) | |
(-> (range 5) reverse filter `#(% > 1)) | |
(-> [2 5 4 1 3 6] reverse rest sort last) |
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
mysql> create table mars( id int unsigned, bar enum('foo','bar','baz')) | |
mysql> insert into mars values (1,'foo'), (2, 'bar'), (3, 'baz'); | |
mysql> select * from mars; | |
+------+------+ | |
| id | bar | | |
+------+------+ | |
| 1 | foo | | |
| 2 | bar | |
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
true | |
true | |
true | |
true | |
true | |
user system total real | |
Foo 0.990000 0.000000 0.990000 ( 0.989358) | |
Bar 0.720000 0.000000 0.720000 ( 0.713166) | |
Baz 0.320000 0.000000 0.320000 ( 0.323896) | |
Fle 0.330000 0.000000 0.330000 ( 0.326319) |
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
#!/usr/bin/env ruby | |
require 'net/http' | |
def get_server(site) | |
Net::HTTP.start(site, 80) do |http| | |
response = http.head('/') | |
response['server'] | |
end | |
rescue Exception => e |
NewerOlder