Skip to content

Instantly share code, notes, and snippets.

View coronin's full-sized avatar
💭
Find me @the_paper_link

Liang Cai coronin

💭
Find me @the_paper_link
View GitHub Profile
@coronin
coronin / crispr.html
Last active August 29, 2015 14:06
run nicely with ots_server and Web Blat
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>crispr scanner, made by Liang Cai</title>
<style type="text/css" media="screen"><!--
body{margin:25px;padding:0;font-family:Arial,Helvetica,sans-serif;font-size:100%;line-height:1.5}
article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}
h1,h2,h3,h4{margin:1em 0 .5em;line-height:1.25;font-weight:700}
h1{font-size:2em}
@messense
messense / proxy.pac
Last active December 17, 2015 09:39
pac file
/**
* GenPAC 0.2.1 http://jeeker.net/projects/genpac/
* Generated: Fri, 17 May 2013 14:15:55 GMT
* GFWList Last-Modified: Fri, 17 May 2013 12:41:31 GMT
*/
// proxy
var P = "PROXY 192.168.1.1:8118; DIRECT";
// user rules
@maxkfranz
maxkfranz / code.js
Last active April 21, 2017 09:48
Visual style
$(function(){ // on dom ready
var cy = cytoscape({
container: document.getElementById('cy'),
layout: {
name: 'cose',
padding: 10,
randomize: true
},
@littlecodersh
littlecodersh / WechatSmartWish.py
Created September 28, 2016 03:01
Demo of sending smart wishes through wechat.
#coding=utf8
import itchat, time
SINCERE_WISH = u'祝%s新年快乐!'
REAL_SINCERE_WISH = u'祝%s新年快乐!!'
def send_wishes():
friendList = itchat.get_friends(update=True)[1:]
for friend in friendList:
# 如果不是演示目的,把下面的方法改为itchat.send即可
@Triavanicus
Triavanicus / gfm.py
Last active July 14, 2019 06:42 — forked from gasman/gfm.py
import re
from hashlib import md5
from markdown import markdown
def gfm(value):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(matchobj.group(0).encode('utf-8')).hexdigest()
extractions[digest] = matchobj.group(0)
@littlecodersh
littlecodersh / WeChatCheckFriend.py
Created September 28, 2016 04:59
Demo of checking friends' status of wechat.
#coding=utf8
import itchat
CHATROOM_NAME = 'friend'
CHATROOM = None
HELP_MSG = u'''\
好友状态监测
* 发送名片将会返回好友状态
* 请确有名为%s的未使用的群聊
* 并将该群聊保存到通讯录
@jmasonherr
jmasonherr / url_to_image_service.py
Last active April 21, 2020 12:55
Upload a photo to App Engine's Image service from a URL of an image elsewhere on the internet. Integrates App Engine's images service with InkPicker, so we can use their upload and store the actual image in our server
# Requires poster https://pypi.python.org/pypi/poster/
# Requires webapp2 on App Engine for demo
# Example usage:
# import requests
# 'http://upload.wikimedia.org/math/4/7/9/479d9d21b183eb546b771447fcf69ddf.png'
# response = requests.post('http://myapp.appspot.com/i/post_from_url', {'url': wikipediaimg})
import json
@wanliang1221
wanliang1221 / nginx 反向代理 blog.conf
Created July 19, 2016 05:54 — forked from shellexy/nginx 反向代理 blog.conf
在 vps 用 nginx 反向代理 wordpress/blogger
# /etc/nginx/sites-available/blog.shellexy.info
server {
resolver 8.8.8.8;
listen 80;
server_name blog.shellexy.info;
#access_log off;
access_log /var/log/nginx/blog.shellexy.info.access.log;
location / {
#避免远方启用压缩导致无法替换纯文本
proxy_set_header Accept-Encoding "";
@reorx
reorx / python_deployment.rst
Last active December 14, 2020 03:31
Python Deployment

This document is still a scratch

Python Deployment

Setup A Workplace

You’ll want a directory to do this in so that you don’t screw up your machine.

@Kxrr
Kxrr / webdev_jianguoyun.py
Last active January 18, 2022 08:40
Webdev example for Jianguoyun
# -*- coding: utf-8 -*-
"""
* 关于坚果云的 Webdav 的配置可以参看: https://griddiary.uservoice.com/knowledgebase/articles/478287-%E5%9D%9A%E6%9E%9C%E4%BA%91-webdav-%E8%AE%BE%E7%BD%AE%E6%95%99%E7%A8%8B
* 使用前请先安装 `easywebdav` : ``pip install easywebdav``
坚果云 Webdav
============
假设有下面的坚果云目录结构