Skip to content

Instantly share code, notes, and snippets.

@ruandao
ruandao / README.md
Last active May 14, 2022 06:53 — forked from raecoo/README.md
Surge config

Install Configurations

Download rules.conf

下面的还没试用过:

Advanced Tips:

# Requires Python 2.x, flask and pywin32
from flask import Flask
import flask
import win32com.client
import pythoncom
import os, os.path, sys, time
# Flask (Web Server)
ws = Flask(__name__)
@ruandao
ruandao / post-receive.sh
Last active November 7, 2015 10:46 — forked from icyleaf/post-receive.sh
git autodeploy script when it matches the string "[deploy]"
#!/bin/sh
#
# git autodeploy script when it matches the string "[deploy]"
#
# @author icyleaf <icyleaf.cn@gmail.com>
# @link http://icyleaf.com
# @version 0.1
#
# Usage:
# 1. put this into the post-receive hook file itself below
@ruandao
ruandao / gist:ee3f6e014fe9ffa61aee
Last active August 29, 2015 14:04 — forked from hebertialmeida/gist:9234391
iOS resize view to fit subviews
- (void)resizeToFitSubviews:(UIView *)view
{
float w, h;
for (UIView *v in view.subviews) {
float fw = v.frame.origin.x + v.frame.size.width;
float fh = v.frame.origin.y + v.frame.size.height;
w = MAX(fw, w);
h = MAX(fh, h);
}
@interface UILabel (dynamicSizeMe)
-(float)resizeToFit;
-(float)expectedHeight;
@end