Skip to content

Instantly share code, notes, and snippets.

View shenqihui's full-sized avatar
💭
I may be slow to respond.

大饼 shenqihui

💭
I may be slow to respond.
View GitHub Profile
@shenqihui
shenqihui / time.py
Created October 23, 2015 11:23 — forked from DeronW/time.py
python 拿当前的时间戳 秒数和毫秒数,time的经度跟系统相关,windows小数点后3位,linux后面6位
import time
from datetime import datetime, date
# 今天
datetime.datetime.today().date().isoformat()
# 通过日期对象生成时间戳
int(time.mktime(datetime.now().timetuple()))
# 通过时间戳生成日期对象,timestamp 的时间戳以秒为单位
@shenqihui
shenqihui / rules.conf
Created October 14, 2015 06:02 — forked from janlay/README.md
Yet another config for Surge.app (build 245+)
# This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.
# NOTE: This file depends on the main.conf which defines your own proxy.
# Your main.conf will look like this:
# ---- START ----
# #!PROXY-OVERRIDE:rules.conf
# [Proxy]
# Proxy = https,server.address,port,username,password
# ---- END ----
#
@shenqihui
shenqihui / gist:a9588497746f39702ddc
Last active August 29, 2015 14:27 — forked from zjhui/gist:9530924
在wr720n上利用extroot将openwrt扩容
1、在openwrt上安装block-mount,挂载硬盘时需要它
opkg update
opkg install block-mount
2、挂载硬盘
mount /dev/sda2 /mnt
3、把/目录下的文件迁移到U盘,pivot-root方式,适用于Barrier Breaker(trunk)版本
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
@shenqihui
shenqihui / shadowsocks-on-openwrt.md
Last active August 29, 2015 14:27 — forked from messense/shadowsocks-on-openwrt.md
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@shenqihui
shenqihui / wr703n-openwrt.md
Last active August 29, 2015 14:27 — forked from ninehills/wr703n-openwrt.md
WR703N OpenWrt 配置流程

WR703N OpenWrt 配置流程

下载安装

访问WR703N在OpenWrt的[Wiki页][wr703n-openwrt],然后在Flashing一节中找到下载链接:[squashfs-factory.bin][flash.bin],下载后别忘了[比对md5][md5sum]。[1]

进入路由器管理界面,出厂配置为http://192.168.1.1,用户名和密码均为admin,然后进入固件更新,选择下载的文件,然后更新。

@shenqihui
shenqihui / gameengines.md
Last active August 29, 2015 14:26 — forked from bebraw/gameengines.md
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
'''
given a Model with:
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES)
pubdate = models.DateTimeField(default=datetime.now)
<other fields>
Fetch the item from each category with the latest pubdate.
'''
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->