This file contains 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
extern crate kernel32; | |
extern crate winapi; | |
use kernel32::{CreateProcessA, WaitForSingleObject, CloseHandle}; | |
use winapi::{LPCSTR, LPSTR, LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPSTARTUPINFOA, | |
LPPROCESS_INFORMATION, PROCESS_INFORMATION, STARTUPINFOA}; | |
use winapi::winbase::INFINITE; | |
use std::ptr::null_mut; | |
use std::mem::size_of; | |
fn main() { |
This file contains 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
C:\Users\Artemciy\Downloads>test_bash_bat.exe | |
Output { | |
status: ExitStatus(ExitStatus(0)), | |
stdout: "\r\nC:\\Users\\Artemciy\\Downloads>echo foo \r\nfoo\r\n\r\nC:\\Users\\Artemciy\\Downloads>bash --help \r\n\u{1e}\u{4}H\u{4}8\u{4}1\u{4}:\u{4}0\u{4}:\u{0} \u{0}0\u{0}x\u{0}8\u{0}0\u{0}0\u{0}7\u{0}0\u{0}0\u{0}0\u{0}6\u{0}\r\u{0}\r\u{0}\n\u{0}\r\nC:\\Users\\Artemciy\\Downloads>echo bar \r\nbar\r\n", | |
stderr: "" } |
This file contains 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
// [build] rustc -O bench_iterators.rs --test | |
// [build] ./bench_iterators.exe --bench | |
#![feature(test)] | |
extern crate test; | |
use test::{Bencher, black_box}; | |
#[bench] | |
fn construction_only(b: &mut Bencher) { | |
let foo = String::from("foo"); |
This file contains 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
package test; | |
import java.util.ArrayList; | |
import java.util.Random; | |
public class Keys implements Comparable<Keys> { | |
private final int[] keys; | |
public Keys(final int[] keys) { | |
this.keys = keys; |
This file contains 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
pub struct PcreJit { | |
pub re: Mutex<pcre::Pcre>, | |
/// Map from a capturing group name to its number. | |
/// `None` if no named capturing groups found or if the `auto_capture` option is given to `PcreJit::new`. | |
pub names: Option<BTreeMap<String, Vec<usize>>>} | |
unsafe impl Sync for PcreJit {} | |
unsafe impl Send for PcreJit {} | |
impl PcreJit { | |
/// JIT-compiles the regular expression. | |
/// |
This file contains 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
/// A helper to build a string on the stack. | |
/// | |
/// Given an array it makes a writeable cursor available to the passed code block. | |
/// | |
/// Returns a &str slice pointing at memory between the array start and the cursor. | |
/// | |
/// Example: | |
/// | |
/// use std::io::Write; | |
/// let mut foobar: [u8; 128] = unsafe {std::mem::uninitialized()}; |
This file contains 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
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint at: /tmp/yup-oauth2/target/debug/.fingerprint/yup-oauth2-f648bac97266aa1c/lib-yup-oauth2 | |
DEBUG:cargo::ops::cargo_rustc::fingerprint: extra Target { kind: Lib([Lib]), name: "yup-oauth2", src_path: "/tmp/yup-oauth2/src/lib.rs", metadata: Some(Metadata { metadata: "f648bac97266aa1c", extra_filename: "-f648bac97266aa1c" }), tested: true, benched: true, doc: true, doctest: true, harness: true, for_host: false } Profile { opt_level: 0, lto: false, codegen_units: None, rustc_args: None, debuginfo: true, debug_assertions: true, rpath: false, test: false, doc: false } None = def601c33e56949f | |
DEBUG:cargo::ops::cargo_rustc::fingerprint: extra Target { kind: Lib([Dylib]), name: "serde_macros", src_path: "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_macros-0.4.0/src/lib.rs", metadata: Some(Metadata { metadata: "a56f347bda653264", extra_filename: "-a56f347bda653264" }), tested: true, benched: true, doc: true, doctest: false, harness: true, for_host: true |
This file contains 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
#![feature(scoped_tls)] | |
#[macro_use] extern crate nickel; | |
use nickel::Nickel; | |
use nickel::router::http_router::HttpRouter; | |
use nickel::ResponseFinalizer; | |
struct MyObject; | |
impl MyObject { |
This file contains 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
pub mod ICU { | |
// --- Hand-made ICU bindings --- | |
// $ apt-get install -y libicu-dev | |
// To check the argument types: | |
// $ apt-get install -y libicu52-dbg | |
// $ cd /usr/lib/x86_64-linux-gnu && gdb libicui18n.so | |
// ) print utrans_open_52 | |
// ) ptype UChar | |
// ) ptype UParseError |
This file contains 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
[package] | |
name = "err" | |
version = "0.0.1" | |
authors = ["ArtemGr"] | |
[[bin]] | |
name = "test" | |
path = "test.rs" | |
[dependencies] |