Skip to content

Instantly share code, notes, and snippets.

@TomiBelan
TomiBelan / get_curl_without_curl.sh
Created November 30, 2023 16:29
How to bootstrap a working curl binary on a system with no curl?
#!/bin/bash
# "How to bootstrap a working curl binary on a system with no curl?"
#
# Inspired by https://unix.stackexchange.com/q/83926
# but where that question asks "how to download a file over http with just
# bash?", this script asks "how to download *curl* specifically, including
# working https support?".
#
# It needs: bash, GNU coreutils (rm, mkdir, sha256sum), tar, gzip.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>xxxxxxxxxxxxxxxxxxxxxxxx</title>
<meta http-equiv='X-UA-Compatible' content='IE=Edge'/>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<script type='application/javascript'>
import subprocess as sp
import json
import sys
files = sp.check_output('find logs/ oldlogs/ -type f', shell=True).split()
print('total', len(files), file=sys.stderr)
def process(dups, o):
if isinstance(o, list):
for v in o: process(dups, v)
import os
import re
from collections import defaultdict
base_path = os.path.join(os.path.dirname(__file__), 'static/')
_use_re = re.compile(r'\bVotr\.(\w+)')
_define_re = re.compile(r'\bVotr\.(\w+)\s*=')
_dontdepend_re = re.compile(r'@dontdepend +Votr\.(\w+)')
@TomiBelan
TomiBelan / a.js
Last active January 1, 2016 05:59
es6-module-loader bug POC
export * from './b';