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 / 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 / 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 / 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,
@williamli
williamli / colorize.js
Created April 9, 2019 15:49
colorize.js
// https://30secondsofcode.org/node
module.exports = (...args) => ({
black: `\x1b[30m${args.join(' ')}`,
red: `\x1b[31m${args.join(' ')}`,
green: `\x1b[32m${args.join(' ')}`,
yellow: `\x1b[33m${args.join(' ')}`,
blue: `\x1b[34m${args.join(' ')}`,
magenta: `\x1b[35m${args.join(' ')}`,
@williamli
williamli / cloudbuild-deploy.yaml
Created February 16, 2019 02:46
Google Cloud Build with GitHub plugin
steps:
# Decrypt the file containing the key
- name: 'gcr.io/cloud-builders/gcloud'
args: ...