Skip to content

Instantly share code, notes, and snippets.

View meh's full-sized avatar

meh. meh

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
body {
text-align: center;
font-family: -apple-system, BlinkMacSystemFont,"Segoe UI","Roboto", "Droid Sans","Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #000;
@meh
meh / main.rs
Created January 29, 2017 23:05
#[derive(Deserialize, Debug)]
struct Foo {
bar: String,
}
error: no rules expected the token `i1`
--> src/parser/terminfo.rs:71:1
|
71 | named!(entry<Item>,
| ^
|
= note: this error originates in a macro outside of the current crate
named!(parse<Database>,
do_parse!(
tag!(&[0x1A, 0x01]) >>
name_section: le_i16 >>
boolean_section: le_i16 >>
number_section: le_i16 >>
string_offsets: le_i16 >>
string_section: le_i16 >>
error[E0282]: unable to infer enough type information about `E`
--> src/parser/compiled.rs:27:1
|
27 | named!(parse<Database>,
| ^ cannot infer type for `E`
|
= note: type annotations or generic parameter binding required
= note: this error originates in a macro outside of the current crate
error: aborting due to previous error
@meh
meh / mod.rs
Created October 17, 2016 01:14
named!(SCS<Charset>,
switch!(take!(1),
b"<" => value!(Charset::UserPreferred) |
b"0" => value!(charset::DEC::Graphic.into()) |
b"9" => value!(charset::NRCS::FrenchCanadian.into()) |
b"Q" => value!(charset::NRCS::FrenchCanadian.into()) |
b"`" => value!(charset::NRCS::Norwegian.into()) |
b"E" => value!(charset::NRCS::Norwegian.into()) |
b"6" => value!(charset::NRCS::Norwegian.into()) |
┌[~/projects/rust/mailbox] [master] [1]
└[00:47]> sudo tstime target/release/examples/count /home/meh/mail/github
50946/50946
Exit status: 0
pid: 9630 (count) started: Mon Aug 29 00:48:00 2016
real 2.412 s, user 2.333 s, sys 0.058s
rss 6540 kb, vm 16436 kb
/*
* Input event codes
*
* *** IMPORTANT ***
* This file is not only included from C-code but also from devicetree source
* files. As such this file MUST only contain comments and defines.
*
* Copyright (c) 1999-2002 Vojtech Pavlik
* Copyright (c) 2015 Hans de Goede <hdegoede@redhat.com>
*
diff -ur ffmpeg-2.8.3/libavcodec/avcodec.h ffmpeg-3.0.1/libavcodec/avcodec.h
--- ffmpeg-2.8.3/libavcodec/avcodec.h 2015-11-27 19:13:21.000000000 +0100
+++ ffmpeg-3.0.1/libavcodec/avcodec.h 2016-04-03 16:17:35.000000000 +0200
@@ -93,8 +93,7 @@
*
* If you add a codec ID to this list, add it so that
* 1. no value of a existing codec ID changes (that would break ABI),
- * 2. Give it a value which when taken as ASCII is recognized uniquely by a human as this specific codec.
- * This ensures that 2 forks can independently add AVCodecIDs without producing conflicts.
+ * 2. it is as close as possible to similar codecs
#[doc(hidden)]
#[cfg(target_os = "linux")]
pub fn details_raw(&mut self) -> Res<([u8; 64], [u8; 64])> {
let mut first = [0u8; 64];
first[0] = 0x83;
try!(self.handle.write_control(0x21, 0x09, 0x0300, self.index, &first, Duration::from_secs(0)));
try!(self.handle.read_control(0xa1, 0x01, 0x0300, self.index, &mut first, Duration::from_secs(0)));
let mut second = [0u8; 64];