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/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 |
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
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") |
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
[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 |
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
# -*- coding: utf-8 -*- | |
import gb2260 | |
import sqlalchemy.types as types | |
class ChineseDistrict(types.TypeDecorator): | |
impl = types.Integer | |
def process_bind_param(self, value, dialect): |
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 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 |
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
?> | |
<!-- 恩哼 前面同学没有闭合标签哦 --> |
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
[20:39:15] ***ERROR*** Send a message to (SIP-C/4.0 280 Send SMS OK | |
T: sip:XXXXXXXX@fetion.com.cn;p=2538 | |
I: 5 | |
Q: 2 M | |
L: 114 | |
D: Sun, 17 Oct 2010 12:43:05 GMT | |
XI: A067861FBFA94519BD92D92C2111472F | |
<results><quota-frequency><frequency name="send-sms" day-count="2" month-count="5"/> </quota-frequency></results>)`s mobile phone failed |
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
#include <stdio.h> | |
int main() | |
{ | |
return 0; | |
} |
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
function relative_time(time_value) { | |
var values = time_value.split(" "); | |
time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3]; | |
var parsed_date = Date.parse(time_value); | |
var relative_to = (arguments.length > 1) ? arguments[1] : new Date(); | |
var delta = parseInt((relative_to.getTime() - parsed_date) / 1000); | |
delta = delta + (relative_to.getTimezoneOffset() * 60); | |
if (delta < 60) { | |
return 'less than a minute ago'; |
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
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) | |
{ | |
const BIGNUM *tmp; | |
int a_neg = a->neg, ret; | |
bn_check_top(a); | |
bn_check_top(b); | |
/* a + b a+b | |
* a + -b a-b |
OlderNewer