Skip to content

Instantly share code, notes, and snippets.

Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517): started
Building wheel for cryptography (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /opt/python/cp35-cp35m/bin/python /opt/python/cp35-cp35m/lib/python3.5/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp2x0ddkdy
cwd: /tmp/pip-install-t69_d5wd/cryptography
Complete output (138 lines):
running bdist_wheel
running build
running build_py
@mjpieters
mjpieters / # Sourcemap processing in Python.md
Last active December 15, 2023 11:32
Python sourcemap parsing

Sourcemap processing in Python

This gist contains two Python modules:

  • sourcemap: a module to parse and generate JavaScript source maps
  • base64vlq: code to decode and encode base64 VLQ sequences, an encoding used in source maps.

License

The code is licensed under the terms of the MIT license, included in the gist.

@mjpieters
mjpieters / stacks-palettte-app.json
Last active February 26, 2020 20:52
Stacks palettes plus syntax highlighting color schemes for Stack Overflow, format suitable for https://palettte.app/ import.
[
{
"paletteName": "stacksOrange",
"swatches": [
{
"name": "@orange-900",
"color": "874600"
},
{
"name": "@orange-800",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from config import ThreadFilter, IgnoreThreadsFilter # noqa: F401
import logging
import threading
import time
# Attach the IgnoreThreadsFilter to the main root log handler
# This is responsible for ignoring all log records originating from
# new threads.
main_handler = logging.FileHandler("/tmp/mainlogfile.log", 'a')
@mjpieters
mjpieters / threading-comments.user.js
Created May 3, 2022 15:13
Threaded comments - recovered copy of Balpha's user script (https://stackapps.com/questions/2050/threaded-comments)
// ==UserScript==
// @name threading-comments
// @namespace stackoverflow
// @description Show threaded comments
// @version 1.1
// @match *://stackoverflow.com/*
// @match *://serverfault.com/*
// @match *://superuser.com/*
// @match *://meta.stackoverflow.com/*
// @match *://meta.serverfault.com/*
@mjpieters
mjpieters / touch.js
Last active May 22, 2022 15:16
Touch support for h5ai previews
/*
* Touch support for h5ai previews
*
* Maps left and right swiping gestures on the preview to next and previous controls, double-top to toggling full screen
* Place in the `public/ext` directory, then add `"touch.js"` to the `resources.scripts` list in your `private/conf/options.json` file.
*
* * Copyright: 2022 Martijn Pieters
* * License: The MIT License (MIT)
*/
(function () {
@mjpieters
mjpieters / CodeLLDB-rust-auto-sourcemap.md
Created June 17, 2024 12:28
CodeLLDB & Rust: Automatically add a source map to LLDB for the Rust stdlib

Automatically set the correct source map for your Rust toolchain

When it comes to debugging Rust in VSCode, the CodeLLDB extension provides a great debugging experience. Until you try to step into some Rust stdlib code and are greeted with assembly.

Of course you can manually add a source map entry for your rust toolchain, which involves finding the current rustc version commit hash and the sysroot path for the source code:

$ rustc --version --verbose
rustc 1.76.0 (07dca489a 2024-02-04)
binary: rustc