Skip to content

Instantly share code, notes, and snippets.

@weijarz
weijarz / twitter-hide-all-ads.js
Last active May 19, 2024 01:04
Twitter: Hide all Ads
// ==UserScript==
// @name Twitter: Hide all ads
// @namespace Violentmonkey Scripts
// @match https://x.com/*
// @grant none
// @version 1.0
// @author @weijarz
// @description 7/5/2023, 9:31:41 PM
// ==/UserScript==
@yi-ge
yi-ge / 1Password去重脚本.py
Last active July 7, 2023 06:51
该脚本首先获取所有重复的title,然后提取相关的ID。接着,脚本通过比较Fields和URLs部分,找到重复的项目并将多余的项目ID添加到一个列表中。最后,根据需要,您可以选择删除多余的项目。 相关博文:《1Password去重脚本》 https://www.wyr.me/post/741
import os
import re
import time
import pickle
import subprocess
from collections import defaultdict
def run_command(command, error_msg=None, show_output=True):
try:
@qxj
qxj / 小米电视精简.bat
Last active October 10, 2022 07:38
小米电视精简,删除无用软件包,同时替换tvlauncher,小米电视4X 65寸测试ok。https://blog.zgcwkj.cn/archives/143.htmlhttps://www.znds.com/tv-1170521-1-1.html
@echo off
cd /d "%~dp0"
echo 温馨提示:若电视执行脚本后异常,恢复方法“关电视,拔电源,等十秒后,然后插电源,同时按住遥控器主页键和菜单键不放,开电视,然后进入recovery,清除数据后重启,就会恢复原厂设置了。
echo 打开设置-关于-产品型号,对着产品型号连点七次,开发模式就开启了,之后返回账号与安全,找到adb调试,并打开,接着进入网络设置,记住自己的IP地址
echo 语音搜索西游记,播放,安装云视听极光插件,腾讯视频必须,否则没法播放
echo 语音搜索汪汪队,播放,安装播放插件
set /p var=按回车键继续:
echo 请输入电视IP地址,按回车键确认,此时电视会提示是否连接电脑,选择确认即可;
@kfatehi
kfatehi / 1pass_dups.js
Last active November 27, 2024 20:38 — forked from thehesiod/1pass_dups.py
1password duplicate remover (alpha, only run in debugger with breakpoints everywhere *g*)
// you need `op` tool for this, download it here https://support.1password.com/command-line/
// create items.json like so:
// op list items | jq > items.json
// then run this script
// this script outputs uuids of dupes as keyed by item title, create, and modified date,
// feed it into the delete command like so:
// node process.js | xargs -I{} op delete item {}
const items = require('./items.json');
@thehesiod
thehesiod / 1pass_dups.py
Last active December 21, 2024 15:18
1password duplicate remover (alpha, only run in debugger with breakpoints everywhere *g*)
#!/usr/bin/env python3
import json
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor
import html
import dictdiffer
import iso8601
import Foundation
/// NSURLSession synchronous behavior
/// Particularly for playground sessions that need to run sequentially
public extension NSURLSession {
/// Return data from synchronous URL request
public static func requestSynchronousData(request: NSURLRequest) -> NSData? {
var data: NSData? = nil
let semaphore: dispatch_semaphore_t = dispatch_semaphore_create(0)
@speaktoalvin
speaktoalvin / IAPHelper.txt
Last active April 29, 2021 04:07
In App Purchase in Swift, with Receipt Validation
import UIKit
import StoreKit
//MARK: SKProductsRequestDelegate
extension IAPHelpers : SKProductsRequestDelegate
{
func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse)
{
@soffchen
soffchen / surge.conf
Last active April 13, 2025 14:52
surge.conf
[General]
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
BJ-All = custom
BJ-HK-Azure = custom
BJ-US-Azure = custom
@janlay
janlay / README.md
Last active March 20, 2025 13:05
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.