Skip to content

Instantly share code, notes, and snippets.

@geofft
geofft / flake8_profiles.patch
Created September 8, 2023 14:58
flake8_profiles
diff --git a/flake8_profiles.py b/flake8_profiles.py
index 2921f77..aadb0ae 100644
--- a/flake8_profiles.py
+++ b/flake8_profiles.py
@@ -3,6 +3,7 @@ from __future__ import print_function
import os.path
import sys
+from flake8.exceptions import ExecutionError
from flake8.options import config
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@geofft
geofft / Makefile
Last active February 9, 2018 02:59
all: uvsysc.so
uvsysc.so: uvsysc.c
$(CC) -fPIC -shared -o $@ $< -ldl
clean:
rm uvsysc.so
.PHONY: clean
#include <linux/seccomp.h>
#include <linux/filter.h>
#include <linux/audit.h>
#include <sys/prctl.h>
#include <asm/unistd.h>
#include <stddef.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
@geofft
geofft / Makefile
Last active September 18, 2015 19:05
LD_PRELOAD + RTLD_LOCAL
all: intermediate.so preload.so main
intermediate.so: intermediate.c
cc -o $@ -fPIC -shared $< -lgnutls
preload.so: preload.c
cc -o $@ -fPIC -shared $< -ldl
main: main.c
cc -o $@ $< -ldl
@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")
+