Skip to content

Instantly share code, notes, and snippets.

View zyz954489346's full-sized avatar
👋
hi

Zed zyz954489346

👋
hi
  • China Shanghai
View GitHub Profile
@zyz954489346
zyz954489346 / remove_QQPCMgr.py
Created May 21, 2024 10:59 — forked from henryalps/remove_QQPCMgr.py
Remove macOS iOA completely 彻底清除macOS上的iOA服务及残留文件
#!/usr/bin/env python
import subprocess
# Check if `launchctl` is installed
try:
subprocess.run(['pip', 'show', 'launchctl'], check=True)
except subprocess.CalledProcessError:
# `requests` is not installed, so install it using pip
subprocess.run(['pip', 'install', 'launchctl'], check=True)
@zyz954489346
zyz954489346 / download-file.js
Created September 28, 2018 12:37 — forked from javilobo8/download-file.js
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);