Skip to content

Instantly share code, notes, and snippets.

@geofft
geofft / a.rs
Last active September 2, 2015 23:00
#[no_mangle] is unsafe
extern crate b;
extern crate c;
fn main() {
println!("{} {}", b::identity(), c::identity());
}
@geofft
geofft / eggman.rs
Last active August 29, 2015 14:21
Rust-ABI calls across dynamic libraries
#![crate_type="dylib"]
#[no_mangle]
pub fn foo(x: std::fmt::Arguments) -> i32 {
println!("{:?}", x);
3
}
@geofft
geofft / main.rs
Last active August 29, 2015 14:20 — forked from alexcrichton/main.rs
#![allow(unused_must_use)]
//extern crate debug;
extern crate syntax;
extern crate rustc;
extern crate rustc_driver;
extern crate rustc_typeck;
extern crate rustc_resolve;
//extern crate collections;
(e)geofft@cactuar:~/src/ssl/cryptography$ git diff
diff --git a/tests/hazmat/primitives/test_asym_utils.py b/tests/hazmat/primitives/test_asym_utils.py
index c3fbedf..e4fd4f2 100644
--- a/tests/hazmat/primitives/test_asym_utils.py
+++ b/tests/hazmat/primitives/test_asym_utils.py
@@ -68,3 +68,11 @@ def test_decode_rfc6979_invalid_asn1():
# This is the BER "end-of-contents octets," which pyasn1 is
# wrongly willing to return from top-level DER decoding.
decode_rfc6979_signature(b"\x00\x00")
+
@geofft
geofft / write.c
Last active August 29, 2015 14:15
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/ip.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void
handler(int signal)