Skip to content

Instantly share code, notes, and snippets.

@jjwhitney
jjwhitney / python-3.6.3-custom-static-openssl.patch
Created November 19, 2020 08:57 — forked from rkitover/python-3.6.3-custom-static-openssl.patch
Patch for Python 3.6.3 to use a custom static OpenSSL
diff -ruN Python-3.6.3.orig/setup.py Python-3.6.3.new/setup.py
--- Python-3.6.3.orig/setup.py 2017-10-02 22:52:02.000000000 -0700
+++ Python-3.6.3.new/setup.py 2017-11-16 13:35:45.000000000 -0800
@@ -811,10 +811,15 @@
exts.append( Extension('_socket', ['socketmodule.c'],
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
+ openssl_root = os.getenv('OPENSSL_ROOT')
+
search_for_ssl_incs_in = [
@jjwhitney
jjwhitney / instructions.txt
Created October 22, 2014 10:59
Recover a ZFS pool hidden on a detached device
Originally written by Jeff Bonwick (http://www.mail-archive.com/zfs-discuss@opensolaris.org/msg15748.html), and updated by James Lee to work with modern ZFS libs (https://www.mail-archive.com/zfs-discuss@opensolaris.org/msg47316.html), I was able to compile this life-saving utility in Ubuntu 14.04 and have verified that it works. (I'm using ZFSonLinux.)
Download the ZFSonLinux tarball and replace the cmd/zhack/zhack.c file with "labelfix.c". Note that zhack is just a simple utility that we're replacing so that we don't have to setup the build environment. (It's hard, so we'll reuse the good work of the ZFSonLinux people.)
Run "./configure; make" and if all goes well then the zfs tools will be built, except for zhack, which we replaced. Run that with the device path to recover your data.
If you want to be super-careful and not tamper with your disk, you can clone it and run the utility on your clone. Or, create an overlay as described in this page: https://raid.wiki.kernel.org/index.php/Recovering_a_failed_
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?aid style="50" type="snippet" readerVersion="6.0" featureSet="257" product="8.0(370)" ?>
<?aid SnippetType="InCopyInterchange"?>
<Document DOMVersion="8.0" Self="d">
<Color Self="Color/C=100 M=50 Y=0 K=21" Model="Process" Space="CMYK" ColorValue="100 50 0 21" ColorOverride="Normal" AlternateSpace="NoAlternateColor" AlternateColorValue="" Name="C=100 M=50 Y=0 K=21" ColorEditable="true" ColorRemovable="true" Visible="true" SwatchCreatorID="7937" />
<Color Self="Color/Black" Model="Process" Space="CMYK" ColorValue="0 0 0 100" ColorOverride="Specialblack" AlternateSpace="NoAlternateColor" AlternateColorValue="" Name="Black" ColorEditable="false" ColorRemovable="false" Visible="true" SwatchCreatorID="7937" />
<Color Self="Color/Paper" Model="Process" Space="CMYK" ColorValue="0 0 0 0" ColorOverride="Specialpaper" AlternateSpace="NoAlternateColor" AlternateColorValue="" Name="Paper" ColorEditable="true" ColorRemovable="false" Visible="true" SwatchCreatorI