Skip to content

Instantly share code, notes, and snippets.

@heywin
heywin / warp.sh
Created April 4, 2023 17:44
Cloudflare WARP 一键安装脚本
#!/usr/bin/env bash
#
# https://github.com/P3TERX/warp.sh
# Description: Cloudflare WARP Installer
# System Required: Debian, Ubuntu, Fedora, CentOS, Oracle Linux, Arch Linux
# Version: beta39
#
# MIT License
#
# Copyright (c) 2021-2022 P3TERX <https://p3terx.com>
@echo off
color f0
echo 修改远程桌面 3389 端口 ( 支持 Windows 2003 2008 2008R2 2012 2012R2 7 8 10 )
echo 自动添加防火墙规则
echo %date% %time%
echo ARK
set /p c= 请输入新的端口 :
if "%c%"=="" goto end
goto edit
:edit
@heywin
heywin / cart.liquid
Last active March 25, 2021 01:27 — forked from atikju/cartDiscount.liquid
Shopify - Apply Discount / Coupon / Promo Code on cart page
<div class="cart-promo">
<input type="text" id="devPromo" placeholder="Discount Code">
<a href="/checkout?discount=none" id="redemDevPromo" class="btn" style="margin-bottom:0px">Apply</a></div>
<script>$(document).ready(function() {
//listen to the promo button click
$('#redemDevPromo').on('click',
function(event) {
//disable the button event
event.preventDefault();
//write the url format
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.google.Chrome</key>
@heywin
heywin / chromedriver.md
Last active February 12, 2017 12:01
MacOS下selenium和chromedriver配置
# 规则配置仅供参考,适用于Surge iOS 1.2.3 (543) 及其后续版本;
# 包含 Proxy Group、URL Rewrite 特性;
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计;
# 屏蔽 Hao123、百度联盟广告以及部分运营商网页漂浮广告;
# Surge 新手使用指南 http://bit.ly/1q5eTlF
[General]
# warning, notify, info, verbose
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/96
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
loglevel = notify
@heywin
heywin / p.php
Created November 20, 2015 04:21
雅黑PHP探针
<?php
/* ----------------本探针基于YaHei.net探针------------------- */
error_reporting(0); //抑制所有错误信息
@header("content-Type: text/html; charset=utf-8"); //语言强制
ob_start();
$title = "雅黑PHP探针";
$version = "v0.4.2"; //版本号
define('HTTP_HOST', preg_replace('~^www\.~i', '', $_SERVER['HTTP_HOST']));
@heywin
heywin / wxtest.php
Created November 20, 2015 04:20
微信Token验证失败测试代码
<?php
define("TOKEN", "weixin");
traceHttp();
$wechatObj = new wechatCallbackapiTest();
$wechatObj -> valid();
class wechatCallbackapiTest
{
public function valid()
@heywin
heywin / readme.txt
Created October 9, 2015 07:19 — forked from fqrouter/readme.txt
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(