Skip to content

Instantly share code, notes, and snippets.

View ibigbug's full-sized avatar
🏓
Focusing

Yuwei Ba ibigbug

🏓
Focusing
View GitHub Profile
@reorx
reorx / mail_threading.py
Created September 19, 2011 17:00
mail_threading
from django.core.mail import send_mail as core_send_mail
from django.core.mail import EmailMultiAlternatives
import threading
class EmailThread(threading.Thread):
def __init__(self, subject, body, from_email, recipient_list, fail_silently, html):
self.subject = subject
self.body = body
self.recipient_list = recipient_list
self.from_email = from_email
@lepture
lepture / lib.less
Created January 12, 2012 04:13
less: the missing lib
.animation() {
-webkit-animation: @arguments;
-moz-animation: @arguments;
-ms-animation: @arguments;
-o-animation: @arguments;
animation: @arguments;
}
.animation-delay() {
-webkit-animation-delay: @arguments;
-moz-animation-delay: @arguments;
@tonyseek
tonyseek / extract_captcha.py
Created July 26, 2012 13:13
Distinguish captcha with PIL and Tesseract
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import StringIO
import requests
import PIL.Image
import tesserwrap
@m3nd3s
m3nd3s / NERDTree.mkd
Last active November 23, 2023 13:45
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@yyx990803
yyx990803 / frameworks.md
Created December 3, 2012 21:52
国内互联网公司的前端框架简介

百度:Tangram

基本上就是个百度版jQuery,2.0版本使用链式API,更像了。
配套的还有UI库Magic和模版引擎BaiduTemplate(和ejs很像)

腾讯:JX

理念在介绍里面写的很详细,代码清晰,注释丰富,可读性很好,但只有文档没有实例。
比较传统的大块头框架,本质上来说还是一堆工具方法和对象的堆积,提供了很基本的模块化的开发方式,但没有模块间的依赖关系支持。

@lembacon
lembacon / luna_pinyin.emoji.dict.yaml
Last active November 20, 2023 16:09
Pinyin-Emoji Dictionary for Squirrel
# Rime dictionary
# encoding: utf-8
---
name: luna_pinyin.emoji
version: "2017.02.10"
sort: by_weight
use_preset_vocabulary: true
...
@narze
narze / evasi0n.js
Created February 4, 2013 05:30
evasi0n.com countdown script
var indicator = document.getElementById("progress_indicator");
var text = document.getElementById("progress_text");
var _0x11c7=["\x6E\x6F\x77"];
var initialValue=90;
var special=1359931162544;
var magic=Date[_0x11c7[0]]();
var happy=1;
var evad3rs=special+33999986939652;
var code=Date[_0x11c7[0]]();
var key=magic>>1;
@JacksonTian
JacksonTian / after.js
Last active November 24, 2016 09:02
循环异步调用
var After = function (callback) {
this.index = 0;
this.counter = 0;
this.results = [];
this.callback = callback;
};
After.prototype.group = function (callback) {
var that = this;
var index = that.index;
@vodik
vodik / SOS.md
Last active June 28, 2024 04:08
_Never_ -Sy when installing!

Once upon a time there was a user that wanted to install firefox.

The user tried to do pacman -S firefox but it didn't work. The all mighty pacman reported that firefox-3.2.4-1.i686.pkg.tar.gz could not be found on his mirror. So the user tried pacman -Sy firefox. It worked and the user rejoiced since he could once again go and troll /h/.

But all was not good. The user had made a grave error!

See, when the user told the almighty pacman to -Sy firefox, pacman did

@BrendanEich
BrendanEich / gist:5753666
Created June 11, 2013 00:36
ES6 version of Peter Norvig's Sudoku solver originally written in Python
// XXX should be standard (and named clone, after Java?)
Object.prototype.copy = function () {
let o = {}
for (let i in this)
o[i] = this[i]
return o
}
// Containment testing for arrays and strings that should be coherent with their iterator.
Array.prototype.contains = String.prototype.contains = function (e) {