Skip to content

Instantly share code, notes, and snippets.

@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>
# 规则配置仅供参考,适用于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 / 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(

Theme Testing Process

from Theme Development (Wordpress Codex)

  • Fix PHP and WordPress errors. Add the following debug setting to your wp-config.php file to see deprecated function calls and other WordPress-related errors: define('WP_DEBUG', true);. See Deprecated Functions Hook for more information.
  • Check template files against Template File Checklist.
  • Do a run-through using the Theme Unit Test.
  • Validate HTML and CSS. See Validating a Website.
  • Check for JavaScript errors.
  • Test in all your target browsers. For example, IE7, IE8, IE9, Safari, Chrome, Opera, and Firefox.
  • Clean up any extraneous comments, debug settings, or TODO items.