Skip to content

Instantly share code, notes, and snippets.

@codexss
codexss / README.md
Last active May 14, 2023 04:29
Google Home Mini for use in China / 在中国使用Google Home Mini

目前整理的配置文件如下,已做最简化配置,如有问题请留言。
如果有需要主路由的规则配的话回头我再整理一下。

使用到的第三方软件:
CLASH: https://github.com/Dreamacro/clash

// ==UserScript==
// @name Open Twitter App
// @version 1.0.7
// @author Lentin
// @match https://twitter.com/*
// @match https://mobile.twitter.com/*
// @downloadURL https://gist.github.com/codexss/eb5ae8fa5ff85112e091d6f4e0f48f3f/raw/open-twitter-app.user.js
// @updateURL https://gist.github.com/codexss/eb5ae8fa5ff85112e091d6f4e0f48f3f/raw/open-twitter-app.user.js
// @homepage https://gist.github.com/codexss/eb5ae8fa5ff85112e091d6f4e0f48f3f/
// ==/UserScript==
@codexss
codexss / v2ex.user.js
Last active June 15, 2022 08:01
v2ex.user.js
// ==UserScript==
// @name V2EX 助手
// @description 为V2EX添加自动签到、自动解析图片链接等功能
// @include https://*.v2ex.com/*
// @include https://v2ex.com/*
// @grant none
// ==/UserScript==
//自动签到 代码来自caoyue@v2ex
@codexss
codexss / pixivDylib.xm
Created June 26, 2019 14:13
hook pixiv ad-banner
#import <UIKit/UIViewController.h>
@interface _TtC5pixiv26AdContainingViewController : UIViewController
@property(nonatomic) __weak UIView *adContainerView;
@end
%hook _TtC5pixiv26AdContainingViewController
- (void)viewDidLayoutSubviews{
[self.adContainerView removeFromSuperview];
}
@codexss
codexss / tiebaDylib.xm
Last active June 26, 2019 14:57
hook for tieba client
%hook TBCSplashLaunchADView
- (void)setupUI{}
%end
//启动闪图广告
%hook TBCHomePageViewController
- (void)setupTableHeaderView:(id)arg1{}
%end
//首页顶部广告
javascript:(function(){var a=window.open("about:blank").document;var b=document.createElement("div");var c=location.href;b.appendChild(document.createTextNode(document.getElementsByTagName("html")[0].innerHTML));a.write("<!DOCTYPE html><html><head><title>view-source:"+c+'</title><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="http://www.google.com/s2/favicons?domain="'+c+' rel="icon" type="image/x-icon"/><link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/github.min.css"><script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"><\/script><script src="//cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js"><\/script><script>hljs.initHighlightingOnLoad();hljs.initLineNumbersOnLoad();<\/script><style>.hljs-ln-numbers{text-align:right;color:#808080;word-break:normal;white-space:nowrap;font-size:9px;font-family:Helvetica;user-select:none;box-sizing:border-box;width:31px;background-color:#
var port_number = 8080
var plist_url = "itms-services://?action=download-manifest&url=https://qcloud.coding.net/u/lentin/p/file/git/raw/master/ipa-installer.plist"
// 从应用内启动
if ($app.env == $env.app) {
$drive.open({
handler: function(data) {
fileCheck(data)
}
})
@codexss
codexss / view-source.js
Created May 20, 2018 09:52
for Safari on iOS
javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.style.wordWrap="break-word";b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
@codexss
codexss / doc.md
Created January 16, 2018 16:03
各种解码网站
@codexss
codexss / iptables.txt
Created November 2, 2017 03:16
PORT FORWARD
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8388
iptables -t nat -A PREROUTING -p udp -m udp --dport 80 -j REDIRECT --to-ports 8388
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8388
iptables -t nat -A PREROUTING -p udp -m udp --dport 443 -j REDIRECT --to-ports 8388