Skip to content

Instantly share code, notes, and snippets.

View sarices's full-sized avatar

zhengweidong sarices

  • 中国
  • 05:23 (UTC +08:00)
View GitHub Profile
@sarices
sarices / ai.list
Last active July 24, 2024 06:26
ai clash rule list
DOMAIN-SUFFIX,openai.com
DOMAIN-SUFFIX,sentry.io
DOMAIN-SUFFIX,pay.openai.com
DOMAIN-SUFFIX,identrust.com
DOMAIN,openaiapi-site.azureedge.net
DOMAIN-SUFFIX,chat.openai.com
DOMAIN-SUFFIX,challenges.cloudflare.com
DOMAIN-SUFFIX,auth0.openai.com
DOMAIN-SUFFIX,platform.openai.com
# Add ai.com
@sarices
sarices / hosts
Last active October 11, 2018 16:08
my xiaomi tv ad host for lede
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
@sarices
sarices / shubhd.com.direct.link.user.js
Created February 21, 2017 02:17
subhd.com 生成直接下载链接
@sarices
sarices / TestController.class.php
Last active August 29, 2015 14:21
自动路由到post或者get 的方法
use Think\Controller;
class TestController extends Controller {
protected function _empty(){
$act = '';
if(IS_POST) $act = 'post_';
if(IS_GET) $act = 'get_';
$method = $act.ACTION_NAME;
if(!method_exists($this,$method)) throw new \Exception('action not exists');
$this->$method();
}
@sarices
sarices / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

分支管理

最少有三个长期分支

  • master: 用于生产环境部署
  • testing: 用于测试环境测试
  • dev: 用于日常开发

有一些临时分支

@sarices
sarices / authcode
Created October 12, 2013 01:36
Discuz 加密函数
// $string: 明文 或 密文
// $operation:DECODE表示解密,其它表示加密
// $key: 密匙
// $expiry:密文有效期
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
// 动态密匙长度,相同的明文会生成不同密文就是依靠动态密匙
$ckey_length = 4;
// 密匙
$key = md5($key ? $key : $GLOBALS['discuz_auth_key']);
@sarices
sarices / muma
Created August 20, 2013 07:34
服务器感染的木马,来自这个域名js.dongtai666.com
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
@sarices
sarices / dedecms_title_keywords_description
Created August 2, 2013 06:16
dedecms 自动标题 无关键字和介绍时使用网站公共的数据
<title>{dede:php}
$typeid = intval($refObj->Fields['typeid']);
$aid = intval($refObj->Fields['aid']);
if($aid>0) echo $refObj->Fields['title'].' - ';
if($typeid>0) echo $refObj->Fields['typename'].' - ';
{/dede:php}{dede:global.cfg_webname/}</title>
{dede:field.keywords runphp='yes'}
//自动匹配是否有值,无值使用系统配置的值
$k = @me;
if($k=="")