URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
package main | |
import ( | |
"fmt" | |
"os" | |
"net" | |
"bufio" | |
"encoding/binary" | |
) |
// ==UserScript== | |
// @name Code Check Exporter | |
// @namespace https://zr.is/ | |
// @version 0.5 | |
// @description Export all files in code checker. (SJSU) | |
// @author Zeyi Fan (Zeray Rice) | |
// @match http://cs20.cs.sjsu.edu:8080/codecheck/* | |
// @grant none | |
// @require https://raw.githubusercontent.com/Stuk/jszip/v2.4.0/dist/jszip.min.js | |
// @updateURL https://gist.github.com/fanzeyi/c46ab3dc5319ac24b7f0/raw/code-check-exporter.user.js |
# -*- coding: utf-8 -*- | |
import gb2260 | |
import sqlalchemy.types as types | |
class ChineseDistrict(types.TypeDecorator): | |
impl = types.Integer | |
def process_bind_param(self, value, dialect): |
[Adblock Plus 2.0] | |
! Version: 20141221 | |
! Title: DoubanList | |
! Expires: 1 day (update frequency) | |
! Homepage: https://gist.github.com/fanzeyi/b69bff4c45f3dc9d44d0 | |
! | |
douban.com##.lnk-doubanapp | |
douban.com##.get_douban_app | |
movie.douban.com###app-discuss |
class Enum34(types.TypeDecorator): | |
impl = types.Integer | |
def __init__(self, enum_class, *args, **kwargs): | |
super(Enum34, self).__init__(*args, **kwargs) | |
self._enum_class = enum_class | |
def process_bind_param(self, value, dialect): | |
if value not in self._enum_class: | |
raise ValueError("Not a valid enum value") |
#!/bin/sh | |
if [ $(git diff --cached | grep "debugger|console\.log" -E | grep -E "^\+" | wc -l) -gt 0 ]; then | |
echo "[Pre-commit check] Detected debug code in commit. Remove it!" | |
exit 1 | |
fi | |
exit 0 |
--- ./src/video/quartz/SDL_QuartzVideo.h 2014-01-02 02:36:48.000000000 +0800 | |
+++ ./src/video/quartz/SDL_QuartzVideo.h 2014-01-02 02:36:50.000000000 +0800 | |
@@ -91,7 +91,9 @@ | |
CGDirectDisplayID display; /* 0 == main display (only support single display) */ | |
const void *mode; /* current mode of the display */ | |
const void *save_mode; /* original mode of the display */ | |
+#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) | |
CGDirectPaletteRef palette; /* palette of an 8-bit display */ | |
+#endif | |
NSOpenGLContext *gl_context; /* OpenGL rendering context */ |
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from flask import Response | |
from flask import stream_with_context | |
import requests | |
app = Flask(__name__) |
URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
" Zeray Rice's New Vimrc | |
" Created: Augest 24, 2013 | |
" =============== | |
" Vundle | |
" =============== | |
set nocompatible | |
filetype off |