Skip to content

Instantly share code, notes, and snippets.

View icodesign's full-sized avatar
:octocat:
mew~

icodesign icodesign

:octocat:
mew~
View GitHub Profile
{%- macro form_field_label(field) -%}
<label for="{{ field.id }}">{{ field.label.text }}
{%- if field.flags.required -%}
<abbr title="Diese Feld muss angegeben werden">*</abbr>
{%- endif %}</label>
{% endmacro %}
{%- macro form_field_description(field) -%}
{% if field.description %}
<span class="descr">{{ field.description }}</span>
//: Playground - noun: a place where people can play
import UIKit
let sink = SinkOf<String> { input in
println(input)
return
}
sink.put("Hello")
@icodesign
icodesign / gist:f55c6743c959f40ad0d8
Created May 5, 2015 08:29
Fix Xcode plugin compatibility issue
sudo find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode-beta.app/Contents/Info DVTPlugInCompatibilityUUID`
@icodesign
icodesign / surge.conf
Created October 24, 2015 15:28 — forked from soffchen/surge.conf
surge.conf
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
Proxy = custom
[Rule]
ruleSets:
- name: Tiny Config
rules:
- DOMAIN-SUFFIX,xda-developers.com,Proxy
- DOMAIN-SUFFIX,xeeno.com,Proxy
- DOMAIN-SUFFIX,xiti.com,Proxy
- DOMAIN-SUFFIX,yahoo.com,Proxy
- DOMAIN-SUFFIX,yimg.com,Proxy
- DOMAIN-SUFFIX,ying.com,Proxy
- DOMAIN-SUFFIX,youtu.be,Proxy
ruleSets:
#
# Potatso Config File [UPlus]
# Last Modified: 2016/07/04
#
- name: UPlus-nogeoip
rules:
# Default
- DOMAIN-SUFFIX,apple.com,DIRECT
- DOMAIN-SUFFIX,icloud.com,DIRECT
@icodesign
icodesign / tf.py
Created September 25, 2016 14:06
TF Invite
#coding: utf-8
# Please install [fastlane](https://github.com/fastlane/fastlane) first.
import os
bundle_identifier = "xxx"
itunes_user = "yyy"
emails = """
a@gmail.com
b@gmail.com
[PROFILE.default]
name = "Sample Profile1"
dns = [
"8.8.8.8",
"223.5.5.5"
]
defaultRoute = "PROXY"
defaultProxy = "ssr"
rulesets = [
"direct",
[RULESET.proxy]
name = "代理规则"
rules = [
"DOMAIN-SUFFIX, 1e100.net, Proxy",
"DOMAIN-SUFFIX, abc.xyz, Proxy",
"DOMAIN-SUFFIX, admob.com, Proxy",
"DOMAIN-SUFFIX, ampproject.org, Proxy",
"DOMAIN-SUFFIX, amazon.com, Proxy",
"DOMAIN-SUFFIX, android.com, Proxy",
"DOMAIN-SUFFIX, androidify.com, Proxy",
@icodesign
icodesign / VPNManager.m
Last active August 2, 2017 06:28
VPNManager
#import "VPNManager.h"
#import <NetworkExtension/NetworkExtension.h>
NSString * const VPNManagerStatusDidChanged = @"VPNManagerStatusDidChanged";
@interface VPNManager ()
@property (nonatomic) NEVPNStatus status;
@end
@implementation VPNManager