Skip to content

Instantly share code, notes, and snippets.

View alex's full-sized avatar

Alex Gaynor alex

View GitHub Profile
from __future__ import print_function
import os
import sys
import zipfile
import requests
def main(argv):
error: failed to run custom build command for `js v0.1.4 (file:///p/mozilla-central/js/rust)`
process didn't exit successfully: `/p/grammarfuzz-hacks/fuzz/target/debug/build/js-d771f9f2d6ad4f99/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=etc/wrapper.hpp
running: "cmake" "/p/mozilla-central/js/rust/." "-DCMAKE_INSTALL_PREFIX=/p/grammarfuzz-hacks/fuzz/target/x86_64-unknown-linux-gnu/debug/build/js-82e5c2af05de8ff1/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=Debug"
--- stderr
ERROR:bindgen::ir::item: Unhandled cursor kind 400: Cursor( kind: UnexposedAttr, loc: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.4.0/../../../../include/x86_64-linux-gnu/c++/6.4.0/bits/c++config.h:223:43, usr: None)
ERROR:bindgen::ir::item: Unhandled cursor kind 400: Cursor( kind: UnexposedAttr, loc: /usr/bin/../lib/gcc/x86_64-linux-gnu
@alex
alex / t.rs
Created September 23, 2017 08:50
// ...
serve_https(addr.parse().unwrap(), tls_config, 16, move |handle,
tls_session| {
let http_client = new_http_client(handle);
HttpHandler {
templates: Arc::clone(&templates),
http_client: Arc::new(http_client),
logs: Arc::clone(&logs),
handle: handle.clone(),
Hello all,
I'd like to report the following BR violations. These were all found in OCSP
responder certificates (thanks to Paul Kehrer for providing the raw data to
enable this).
While there were many violations, I'm highlighting just a few. Excluded
examples include: 'Illegal KeyUsage for RSA key' and my personal favorite,
incorrect encoding of OCSP NoCheck.
bp GDI32!NtGdiAbortDoc ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAbortPath ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAddEmbFontToDC ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAddFontMemResourceEx ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAddFontResourceW ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAddRemoteFontToDC ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAddRemoteMMInstanceToDC ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAlphaBlend ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAngleArc ".echo 'Found a win32k syscall';k;g"
bp GDI32!NtGdiAnyLinkedFonts ".echo 'Found a win32k syscall';k;g"
use std::sync::Arc;
use ring::digest;
static HASH_ALGORITH: &'static digest::Algorithm = &digest::SHA256;
pub enum TreeNode {
Empty { hash: digest::Digest },
Leaf { hash: digest::Digest, data: Vec<u8> },
SubTree {
@alex
alex / gist:93d7f4a2bf04e0ec8fd8bb9dc7af74b5
Created March 31, 2017 14:33
Challenges porting my git workflow to mercurial

Challenges porting my git workflow to mercurial

How I do in git

I want to work on a repo:

$ git clone https://github.com/pyca/cryptography
$ cd cryptography
#!/usr/bin/env python3
import sys
import unicodedata
if __name__ == "__main__":
for arg in sys.argv[1:]:
for c in arg.strip():
print(unicodedata.name(c))
root@1c5ae440220a:/# apt update
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Get:2 http://archive.ubuntu.com trusty-security InRelease [65.9 kB]
Get:3 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:4 http://archive.ubuntu.com trusty Release [58.5 kB]
Get:5 http://archive.ubuntu.com trusty-updates/main Sources [485 kB]
Get:6 http://archive.ubuntu.com trusty-updates/restricted Sources [5957 B]
Get:7 http://archive.ubuntu.com trusty-updates/universe Sources [220 kB]
Get:8 http://archive.ubuntu.com trusty-updates/main amd64 Packages [1193 kB]
diff --git a/twisted/conch/client/default.py b/twisted/conch/client/default.py
index 42c3c7a..fc7834a 100644
--- a/twisted/conch/client/default.py
+++ b/twisted/conch/client/default.py
@@ -11,6 +11,8 @@ you are sitting at an interactive terminal. For example, to programmatically
interact with a known_hosts database, use L{twisted.conch.client.knownhosts}.
"""
+from __future__ import print_function
+