This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!$this->user->hasLogin()) { | |
/** 过滤纯英文评论 */ | |
$pattern = '/[\x{4E00}-\x{9FA5}]/u'; | |
if (!preg_match($pattern, $comment['text'], $match)) { | |
throw new Typecho_Widget_Exception(_t('You should type some Chinese word (like "你好") in your comment to pass the spam-check, thanks for your patience!<br />您的评论中必须包含汉字!<p><a style="color:#FFF; border: 1px solid;text-decoration:none;padding:0px 2px" href="javascript:void(history.back())">点此返回</a></p>')); | |
} | |
/** 过滤包含日文的评论 */ | |
$pattern = '/[\x{3040}-\x{31FF}]/u'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Amazon to CN | |
// @namespace CzBiX | |
// @include http://www.amazon.com/* | |
// @version 2 | |
// @grant unsafeWindow | |
// ==/UserScript== | |
var window = unsafeWindow; | |
var $ = window.jQuery; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import errno | |
__author__ = 'czbix' | |
import argparse | |
import os | |
import re | |
import glob | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Usage: sptcc.py 60XXXXXXXXX | |
import sys | |
import hashlib | |
import json | |
import re | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Bottom { | |
box-shadow:0 0 4px rgba(0,0,0,0.14), 0 4px 8px rgba(0,0,0,0.28); | |
} | |
#Main .box:nth-child(-2n+4):not(.transparent) { | |
box-shadow:0 0 6px rgba(0,0,0,.16),0 6px 12px rgba(0,0,0,.32); | |
} | |
#Search div { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: CzBiX | |
# URL: https://gist.github.com/CzBiX/8608f3520b92a77c79e0 | |
DEST_PACKAGE="unity" | |
DEST_VERSION="7.3.2+15.10.20151016-0ubuntu1" | |
DEST_FILE="/usr/lib/compiz/libunityshell.so" | |
DEST_FILE_HASH="d1be69f0dc23f8a69441359b9aea27f4" | |
PATCH_DATA="341b76: 909090909090" | |
SUCCESS_MSG="Please log out to make patch work." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo Use fakeroot to run this script. | |
exit 1 | |
fi | |
DEBFILE="$1" | |
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create new file at ~/Library/LaunchAgents/environment.plist | |
Add this code block and modify to appropriately set your environmental variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" based on http://github.com/jferris/config_files/blob/master/vimrc | |
set nocompatible | |
set ruler | |
" display incomplete commands | |
set showcmd | |
" do incremental searching |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/tls" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"net" | |
"net/smtp" | |
"os" |
OlderNewer