Skip to content

Instantly share code, notes, and snippets.

View vagra's full-sized avatar

Yan Chen vagra

  • CHINA
  • 12:16 (UTC +08:00)
View GitHub Profile
@vheidari
vheidari / msys2-set-prroxy.txt
Last active January 19, 2024 06:23
MSYS2 - How to set proxy settings in msys2
# Add below lines to the profile in : /etc/profile
# Proxy Setting
export HTTP_PROXY="IpAddress:Port" # Like: 127.0.0.1:1477
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY
@slayer
slayer / cloudflare-delete-all-records.sh
Last active May 14, 2024 21:26
Delete all DNS records for specified zone
#!/bin/bash
TOKEN="xxxxxxxxxxxxxxxxxxx"
ZONE_ID=2222222222222222222222222
# EMAIL=me@gmail.com
# KEY=11111111111111111111111111
# Replace with
# -H "X-Auth-Email: ${EMAIL}" \
# -H "X-Auth-Key: ${KEY}" \
@willurd
willurd / web-servers.md
Last active July 9, 2024 02:49
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mkmik
mkmik / demo
Created June 10, 2011 21:31
go md5/sha1 example
$ for a in md5 sha1 ; do ./hash -$a /bin/ls; ${a}sum /bin/ls; echo; done
a3f812b9fe329322a3d6b00722694e84 /bin/ls
a3f812b9fe329322a3d6b00722694e84 /bin/ls
9eb997f16adb828cd0273f24b0ae94d32c5a3b3f /bin/ls
9eb997f16adb828cd0273f24b0ae94d32c5a3b3f /bin/ls