Skip to content

Instantly share code, notes, and snippets.

View williamli's full-sized avatar

Willi#m ⬣ williamli

View GitHub Profile
@williamli
williamli / rmrf_weibo.js
Created April 15, 2024 06:39
rmrf_weibo_feed
// Usage:
// 1. login to weibo and visit your weibo post list (https://weibo.com/u/_your_id_)
// 2. copy and paste the following functions to console
// 3. start the process with checkAndPerformClicks(1500, 1200); // Runs the function with a 1500ms delay between checks and a 1200ms delay between clicks
// Helper function to create a delay
function delay(duration) {
return new Promise(resolve => setTimeout(resolve, duration));
}
@williamli
williamli / Baidu TongJi + China Firewall = DDOS "Great Cannon"
Last active June 20, 2023 22:01
Baidu TongJi's Javascript Library (//hm.baidu.com/hm.js) Changes (by Firewall of China) to launch DDOS attack on enemy websites?
The Great Firewall of China seems to be hijacking Baidu Analytics (TongJi)'s Javascript code,
launching DDOS attacks on enemy websites from browsers.
Different hm.js (TongJi library) libraries are spotted and load interchangably.
An altered hm.js code is used when DDOS is observed.
More Info: https://stackoverflow.com/questions/45874555/baidu-tongji-analytics-is-directing-browsers-to-ddos-chinas-enemies
@williamli
williamli / GetNordVPNWireGuardDetails.md
Last active June 4, 2023 07:20 — forked from bluewalk/GetNordVPNWireGuardDetails.md
Getting NordVPN WireGuard Details for Raspberry Pi OS

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@williamli
williamli / hongkong_districts_ups.json
Last active June 16, 2022 08:28
102 Hong Kong Districts (UPS) in JSON with Traditional Chinese Translation
// UPS District and Codes for Hong Kong, extracted from UPS Shipping Package Developer Kit PDF
[
{
"name": "Aberdeen",
"translations": {
"zh": "香港仔"
},
"code": "SD1"
},
@williamli
williamli / gist:521bed2cc06ea4ca83ea31957889e685
Created November 25, 2020 05:39 — forked from andphe/gist:3232343
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@williamli
williamli / NordVPN - Launch and Hide.scpt
Created July 11, 2020 06:10
AppleScript to launch and hide NordVPN.app
tell application "NordVPN"
activate
tell application "System Events" to keystroke "w" using {command down}
end tell
delay 0.5
tell application "NordVPN"
activate
tell application "System Events" to keystroke "w" using {command down}
end tell
0.0.0.0 best2019-games-web4.com
0.0.0.0 www.xmeeting.com
0.0.0.0 xmeeting.com
0.0.0.0 www.ipuss.tv
0.0.0.0 hitboom.net
0.0.0.0 www.playamo.com
# Last modified: 13 Jan 2020 14:53 UTC+7
# Version: 2001131453
# Blocked: 1,345 domains
0.0.0.0 debet.com
@williamli
williamli / export_github_issues.py
Created July 3, 2012 17:21 — forked from jj0hns0n/export_github_issues.py
Export GitHub issues to a csv file
import csv
from github2.client import Github
# api settings for github
git_username = ''
git_api_token = ''
git_repo = ''
# csv name
csv_name = "git_hub_issues.csv"
@williamli
williamli / bitbucket-pipeline.yml
Last active August 21, 2019 20:06
GitHub Actions with GCloud credentials passed around as artifacts vs Bitbucket Pipeline and Google Cloud Build. https://twitter.com/_wli/status/1164038895614353408?s=20
options:
docker: true
pipelines:
branches:
master:
- step:
image: google/cloud-sdk:latest
name: Deploy to Production
deployment: production
caches:
@williamli
williamli / randomDictionaryWordsCode.liquid
Last active June 8, 2019 18:23
Zendesk Macros - Generates a 5-dictionary-words random code from ticket ID (up to 5 digits) and a random number based on current timestamp.
// Generates a 5-dictionary-words random code from ticket ID (up to 5 digits) and a random number based on current timestamp.
// This sample comes loaded with 500 random dictionary words.
{% assign words = "annoyed, old-fashioned, rhyme, brief, powder, celery, fragile, number, flow, goofy, plastic, deserve, mother, invite, chief, opposite, numerous, sleet, soup, humorous, shelter, superb, receptive, treat, obey, knowing, wash, afford, ban, order, wave, employ, devilish, ripe, destruction, tree, hat, use, uninterested, materialistic, frantic, receipt, alleged, sack, station, entertain, nasty, week, cause, bucket, lazy, abject, juice, disagreeable, acid, seashore, tender, flagrant, garrulous, shrill, vague, bed, sour, curly, lame, delay, land, play, obsolete, immense, upset, extra-small, committee, absorbed, nondescript, shiver, languid, irate, zephyr, whistle, motionless, alcoholic, spiteful, damaged, swanky, blood, pollution, sheep, lake, punish, check, space, need, engine, plough, fairies, tomatoes, run,