Skip to content

Instantly share code, notes, and snippets.

/* command "cambridge" */
CmdUtils.CreateCommand({
names: ["cambridge"],
icon: "http://www.cambridge.org/assets/common/favicon/favicon.ico",
homepage: "http://dictionary.cambridge.org",
author: { name: "Sealence", email: "[email protected]"},
license: "GPL",
description: "Search in Cambridge",
help: "cambridge: your word",
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'input'} ],
@haohaolee
haohaolee / lastfm_auth.user.js
Created October 8, 2012 03:34
A userscript try to display a modal dialog, when clicking the button a popup window opened for last.fm auth page
// ==UserScript==
// @name Last.fm auth test
// @namespace https://gist.github.com/3850590
// @version 0.1
// @description a test for last.fm auth based on gmscrobber
// @match *
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js
// @require https://raw.github.com/haohaolee/gmscrobber/master/simple_scrobbler_user.js
// ==/UserScript==
@haohaolee
haohaolee / killwall.pin
Created November 20, 2012 06:37
Nokia Mobile VPN config for killwall service
[POLICYNAME]
killwall
[POLICYDESCRIPTION]
killwall
[POLICYVERSION]
1.1
[ISSUERNAME]
Do not edit
[CONTACTINFO]
Do not edit
{
"local": "127.0.0.1:8124",
"remote": {
"https://user:pass@proxy:port": [
"rule1",
"rule2"
],
"http://proxy2:port2": [
"/regex/"
]

Keybase proof

I hereby claim:

  • I am haohaolee on github.
  • I am haohaolee (https://keybase.io/haohaolee) on keybase.
  • I have a public key ASDXOsIrK6RSSfxbOUTfbVqKP0Q2AR2wYgpgbEGTWwM28Qo

To claim this, I am signing this object:

@haohaolee
haohaolee / TransparentProxy.py
Last active December 5, 2018 15:55
A transparent proxy prototype using tproxy written in python3 & trio
#!/usr/bin/env python3
import sys
import traceback
import trio
import trio.socket as socket
import struct
"""
@haohaolee
haohaolee / ctc_wuhan_iptv_list.m3u
Last active November 11, 2024 04:07
CTC_IPTV_list
#EXTM3U
#EXTINF:-1 tvg-id="1" tvg-name="CCTV1" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV1.png" group-title="央视",CCTV1HD
http://172.16.11.42:4022/udp/239.254.96.96:8550
#EXTINF:-1 tvg-id="2" tvg-name="CCTV2" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV2.png" group-title="央视",CCTV2HD
http://172.16.11.42:4022/udp/239.69.1.102:10250
#EXTINF:-1 tvg-id="3" tvg-name="CCTV3" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV3.png" group-title="央视",CCTV3HD
http://172.16.11.42:4022/udp/239.69.1.122:10370
#EXTINF:-1 tvg-id="4" tvg-name="CCTV4" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV4.png" group-title="央视",CCTV4HD
http://172.16.11.42:4022/udp/239.69.1.138:10466
#EXTINF:-1 tvg-id="5" tvg-name="CCTV5" tvg-logo="http://epg.51zmt.top:8000/tb1/CCTV/CCTV5.png" group-title="央视",CCTV5HD
@haohaolee
haohaolee / active_record_gem.rb
Created April 26, 2020 17:51
reproduce an rails issue
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@haohaolee
haohaolee / dependency-check.sh
Created June 8, 2020 05:24
OWASP dependency check script
#!/bin/sh
DC_VERSION="latest"
DC_DIRECTORY=$HOME/OWASP-Dependency-Check
DC_PROJECT="dependency-check scan: $(pwd)"
DATA_DIRECTORY="$DC_DIRECTORY/data"
CACHE_DIRECTORY="$DC_DIRECTORY/data/cache"
if [ ! -d "$DATA_DIRECTORY" ]; then
echo "Initially creating persistent directory: $DATA_DIRECTORY"
version: "3.7"
services:
frontend:
image: haohaolee/insecurity-frontend:latest_en
restart: on-failure
ports:
- "3001:80"
backend: