Updated on: Thursday, May 04, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires AutoHotkey v2.0 | |
#SingleInstance Force | |
^+s:: | |
{ | |
; Configuration | |
destFolder := "D:\OneDrive\Documents\Snapshots" | |
; Create destination folder if it doesn't exist | |
if !DirExist(destFolder) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import requests | |
from urllib.parse import urlparse | |
def download_file(url, folder): | |
parsed_url = urlparse(url) | |
filename = os.path.basename(parsed_url.path) | |
base, ext = os.path.splitext(filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WSL通过Win访问网络,所以WSL的网关指向的是Windows,DNS服务器指向的也是Windows,设置WSL的proxy为win的代理ip+端口即可 | |
# WSL中的DNS server在/etc/resolv.conf中查看,该文件是由/etc/wsl.conf自动生成的。 | |
# 如果关闭了wsl.conf中自动生成resolve.conf并自行修改了resolve.conf,DNS nameserver并不是本机win ip | |
# 需要开启wsl.conf的自动生成,再运行以下命令 | |
# https://zhuanlan.zhihu.com/p/153124468 | |
# 添加到环境变量设置中,例如~/.zshrc | |
export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*') | |
export https_proxy="http://${hostip}:7890" | |
export http_proxy="http://${hostip}:7890" |
- Update 21.04.2020: The code still works, but only if you set the account language to English.
- Update 23.11.2019: There are reports that Twitter started to prevent the automated unblocking of accounts. After some 50 to 100 unblocks, the page with blocked accounts get blocked. As a result the script may currently not work.
- Update 17.11.2019: The old code only worked in Firefox. I updated it to work in Chrome as well.
- Update 12.07.2019: NewTwitter also known as Twitter Web has a completely new interface. I updated the code accordingly.
If you have blocked hundreds of accounts, unblocking them one by one takes a lot of time. But there is a quick and easy way to unblock them all at once. You don’t need to give any app write permissions to your account for it to work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#Persistent | |
#SingleInstance, Force | |
#NoEnv | |
#NoTrayIcon | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MaxThreadsPerHotkey 3 | |
!^z:: | |
Toggle := !Toggle | |
Loop | |
{ | |
If (!Toggle) | |
Break | |
Click | |
Sleep 50 ; Make this number higher for slower clicks, lower for faster. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;----------------------------------- | |
; Macro Recorder v2.1+ By FeiYue (modified by Speedmaster) | |
; | |
; Description: This script records the mouse | |
; and keyboard actions and then plays back. | |
; | |
; F1 --> Record(Screen) (CoordMode, Mouse, Screen) | |
; F2 --> Record(Window) (CoordMode, Mouse, Window) | |
; F3 --> Stop Record/Play | |
; F4 --> Play LogFile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Switch between Light & Dark Mode on Windows 11 | |
;IN THIS CASE, APPS ON WINDOWS 11 WILL USE LIGHT/DARK MODE | |
^#!A:: | |
; read current theme | |
RegRead, CurrentTheme, % "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", % "AppsUseLightTheme" | |
; toggle between themes | |
RegWrite, REG_DWORD, % "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", % "AppsUseLightTheme", % 1 - CurrentTheme | |
Return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MaxThreadsPerHotkey 3 | |
^z:: ; Ctrl+Z to toggle | |
Toggle := !Toggle | |
Loop | |
{ | |
If (!Toggle) | |
Break | |
Click | |
Sleep 50 ; Make this number higher for slower clicks, lower for faster. |
NewerOlder