Skip to content

Instantly share code, notes, and snippets.

View vvoody's full-sized avatar

vvoody vvoody

  • Shanghai, China
View GitHub Profile
@ihciah
ihciah / subtitle_downloader.py
Last active March 5, 2023 10:33
Xunlei subtitle downloader
#!/usr/bin/python
# -*- coding: utf-8 -*-
# __author__ = 'ihciah'
# cid_hash_file function from https://github.com/binux/lixian.xunlei/blob/master/libs/tools.py
# Gist: https://gist.github.com/ihciah/30eda05ca36ee9f9f190067538b0ae04
import hashlib
import inotify.adapters
import os
import sys
@jason5ng32
jason5ng32 / surge.conf
Last active April 7, 2024 13:04
Surge Configs ( for 2.x )
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD
@haukurk
haukurk / logstash-netscaler.conf
Created December 3, 2014 17:13
Logstash - Netscaler Config
input {
syslog {
type => "netscaler"
port => "5560"
}
}
filter {
# Set tags for ASAs
input {
file {
path => "/var/log/nginx/access.log"
type => "nginx-access"
sincedb_path => "/var/log/.nginxaccesssincedb"
}
}
input {
file {
path => "/var/log/nginx/error.log"
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
anonymous
anonymous / synack.c
Created July 4, 2013 11:18
/*
** Copyright 2000
** by
** The Board of Trustees of the
** Leland Stanford Junior University.
** All rights reserved.
**
**
** Disclaimer Notice
**
@tonyseek
tonyseek / checklink.py
Created June 25, 2012 17:41
Visit all links of a website.
@ayanamist
ayanamist / shExpMatch.js
Created June 25, 2012 16:11
Better implementation of shExpMatch
function shExpMatch(url, pattern) {
var pCharCode;
var isAggressive = false;
var pIndex;
var urlIndex = 0;
var lastIndex;
var patternLength = pattern.length;
var urlLength = url.length;
for (pIndex = 0; pIndex < patternLength; pIndex += 1) {
pCharCode = pattern.charCodeAt(pIndex); // use charCodeAt for performance, see http://jsperf.com/charat-charcodeat-brackets
@shellexy
shellexy / fanfou.shellex.info.conf
Created June 6, 2012 14:57
nginx 反向代理推特官网移动版给 Chrome Lite/Mobile Safari 使用
# /etc/nginx/sites-available/fanfou.shellex.info
# 这儿假设的域名是 fanfou.shellex.info
# 请替换为实际的域名
server {
resolver 8.8.8.8;
listen 443;
server_name fanfou.shellex.info;
ssl on;
@vol4ok
vol4ok / gist:2587886
Created May 3, 2012 18:21
Split .ape and .flac and convert to .m4a (ALAC) or .mp3 on MacOS X
brew install flac ffmpeg cuetools # ставим нужные пакеты
# скачиваем cuetag.sh скрипт, например отсюда https://github.com/gumayunov/split-cue/blob/master/cuetag
ffmpeg -i 1.ape 1.flac # конвертируем во flac, так как libmac для APE не ставится на osx
cuebreakpoints 1.cue | shnsplit -o flac 1.flac #нарезаем на треки
cuetag 1.cue split-track*.flac #прописываем тэги (cuetag.sh ставится отдельно отдельно)
#конвертируем в ALAC
for f in split-track*.flac
do