Skip to content

Instantly share code, notes, and snippets.

@mbrubeck
mbrubeck / main.rs
Last active May 22, 2018 16:36 — forked from Yatekii/main.rs
pub fn render(library: &Library, state: &mut State, mut stack: Vec<String>, expression: &mut Expression) -> Expression {
match expression {
// We have a symbolic expression that we have to evaluate
Expression::Symbolic(ref mut args) | Expression::NotDone(ref mut args) => {
// If we have a valid expression (unnamed ones are not allowed)
if args.len() > 0 {
// Get the first nested expression
return match args.remove(0) {
// If the first expression is a plain literal
Expression::Literal(Literal::S(name)) => {
armv7_unknown_cloudabi_eabihf cortex-a8
i686_apple_darwin yonah
i686_linux_android pentiumpro
i686_pc_windows_gnu pentium4
i686_pc_windows_msvc pentium4
i686_unknown_cloudabi pentium4
i686_unknown_dragonfly pentium4
i686_unknown_freebsd pentium4
i686_unknown_haiku pentium4
i686_unknown_linux_gnu pentium4
$ hg log -r FIREFOX_59_0_2_RELEASE..FIREFOX_59_0_3_RELEASE
changeset: 471206:239e434d6d2b
tag: FENNEC_59_0_2_BUILD1
tag: FENNEC_59_0_2_RELEASE
tag: FIREFOX_59_0_2_BUILD1
tag: FIREFOX_59_0_2_RELEASE
user: Vlad Baicu <vlad.baicu@softvision.ro>
date: Thu Mar 22 13:46:41 2018 -0700
summary: Bug 1444549 - Remove unused IconTabWidget XML attr. r=mcomella, a=RyanVM
@mbrubeck
mbrubeck / current.rs
Last active April 2, 2018 17:00
Rust buffered I/O convenience functions idea
use std::io::{BufReader, BufWriter};
use std::fs::File;
let src = BufReader::new(File::open("input.txt"))?;
let dst = BufWriter::new(File::create("output.txt"))?;
@mbrubeck
mbrubeck / ssh2-sample.rs
Created February 21, 2018 22:27 — forked from opensourcegeek/ssh2-sample.rs
Failing code
extern crate ssh2;
use std::net::TcpStream;
use ssh2::Session;
fn create_session() -> (TcpStream, Session) {
let tcp = TcpStream::connect("test:22").expect("Cannot connect");
let mut sess = Session::new().expect("cannot start session");
sess.handshake(&tcp).expect("handshake failed");
This file has been truncated, but you can view the full file.
--- powi.txt 2018-02-15 10:00:35.322876392 -0800
+++ powf.txt 2018-02-15 10:00:51.822900588 -0800
@@ -171,13 +171,13 @@
22528399544939170000000000000000000.0,
67585198634817530000000000000000000.0,
202755595904452570000000000000000000.0,
- 608266787713357700000000000000000000.0,
+ 608266787713357740000000000000000000.0,
1824800363140073200000000000000000000.0,
5474401089420219000000000000000000000.0,
<table>
<tr>
<td></td>
<td rowspan=3></td>
<td rowspan=2></td>
</tr>
<tr> incoming_rowspan: [0, 2, 1]
<td></td>
</tr>
<tr> incoming_rospwan: [0, 1, 0]
extern crate unicode_segmentation;
use unicode_segmentation::UnicodeSegmentation;
fn main() {
let namaste = "नमस्ते";
println!("{}", namaste);
let etsaman = namaste.graphemes(true).rev().collect::<String>();
println!("{}", etsaman);
}
actors
asciiutils
autoimpl
basichll
bloomfilter
cargotest
concurrenthashmap
corefoundationsys
coremidi
coremidisys
inside: TreeIterator { current: Tree { nodes: [None, None] }, depth: 0 }
Got out Tree { nodes: [None, None] }
After first inc(0) Tree { nodes: [None, None] }
After second inc(1) Tree { nodes: [Some(Tree { nodes: [None, None] }), None] }
next tree: Some(Tree { nodes: [None, None] })
inside: TreeIterator { current: Tree { nodes: [Some(Tree { nodes: [None, None] }), None] }, depth: 1 }
Got out Tree { nodes: [Some(Tree { nodes: [None, None] }), Some(Tree { nodes: [None, None] })] }
After first inc(1) Tree { nodes: [Some(Tree { nodes: [None, None] }), Some(Tree { nodes: [None, None] })] }
next tree: Some(Tree { nodes: [Some(Tree { nodes: [None, None] }), Some(Tree { nodes: [None, None] })] })
inside: TreeIterator { current: Tree { nodes: [Some(Tree { nodes: [None, None] }), Some(Tree { nodes: [None, None] })] }, depth: 1 }