Skip to content

Instantly share code, notes, and snippets.

@gymgle
gymgle / proxy variables across different tools.csv
Created February 8, 2024 14:40
proxy variables across different tools
Tool curl wget Ruby Python
http_proxy Yes Yes Yes Yes
HTTP_PROXY No No Yes (https://github.com/ruby/ruby/blob/0ed71b37fa9af134fdd5a7fd1cebd171eba83541/lib/uri/generic.rb#L1519) Yes (if REQUEST_METHOD not in env)
https_proxy Yes Yes Yes Yes
HTTPS_PROXY Yes No Yes Yes
Case precedence lowercase lowercase only lowercase lowercase
Reference https://github.com/curl/curl/blob/30e7641d7d2eb46c0b67c0c495a0ea7e52333ee2/lib/url.c#L2250-L2266 https://github.com/jay/wget/blob/099d8ee3da3a6eea5635581ae517035165f400a5/src/retr.c#L1222-L1239 https://github.com/ruby/ruby/blob/0ed71b37fa9af134fdd5a7fd1cebd171eba83541/lib/uri/generic.rb#L1474-L1543 https://github.com/python/cpython/blob/030a713183084594659aefd77b76fe30178e23c8/Lib/urllib/request.py#L2488-L2517
@gymgle
gymgle / get_dateencoded_exif.py
Created April 8, 2023 11:30 — forked from lclibardi/get_dateencoded_exif.py
Get Quicktime Media DateEncoded Exif data
'''
These are 5 different methods that attempt to retrieve the Quicktime property metadata "Media DateEncoded" from an 'mp4' file.
'''
import os
import re
import struct
import subprocess as sub
from datetime import datetime
from hachoir.parser import createParser
@gymgle
gymgle / ss-libev v2ray-plugin.md
Created February 14, 2023 14:19
ss-libev + v2ray-plugin + tls
@gymgle
gymgle / start_stop_memcached_script.sh
Created November 25, 2022 06:43 — forked from tinogomes/start_stop_memcached_script.sh
Script sample to start/stop for linux with nohup
#!/bin/bash
#
BASE=/tmp
PID=$BASE/app.pid
LOG=$BASE/app.log
ERROR=$BASE/app-error.log
PORT=11211
LISTEN_IP='0.0.0.0'
MEM_SIZE=4