Skip to content

Instantly share code, notes, and snippets.

View EkkoG's full-sized avatar

Ekko EkkoG

View GitHub Profile
@PaulTaykalo
PaulTaykalo / ReactiveCocoa.podspec.json
Last active July 17, 2019 06:11
Reactive cocoa 4.1.0 podspec for Cocoapods 1.0
{
"name": "ReactiveCocoa",
"version": "4.2.2",
"summary": "A framework for composing and transforming streams of values.",
"description": "ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming.\nIt provides APIs for composing and transforming streams of values.",
"homepage": "https://github.com/ReactiveCocoa/ReactiveCocoa",
"license": {
"type": "MIT",
"file": "LICENSE.md"
},
@seedante
seedante / DrawAntiRoundedCornerImage.md
Created April 23, 2016 15:31
Draw a mask image with Core Graphics API in Swift

MaskImage

Draw a mask image like Left-3 to blend a rounded corner:

func UIGraphicsDrawAntiRoundedCornerImageWithRadius(radius: CGFloat, outerSize: CGSize, innerSize: CGSize, fillColor: UIColor) -> UIImage{  
    UIGraphicsBeginImageContextWithOptions(outerSize, false, UIScreen.mainScreen().scale)
    let currentContext = UIGraphicsGetCurrentContext()

let bezierPath = UIBezierPath()

set guiheadroom=-20
set shell=/bin/bash
if &term =~ '^\(xterm\|screen\)$' && $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
filetype on
filetype plugin on
set autoindent
set nolazyredraw
set number
@lexrus
lexrus / swift-interview-outline.md
Last active December 28, 2016 07:04
Swift interview outline
  • Array 是 value type,使用 structs 实现
  • 数据类型没有隐式转换
  • 对于 String,count() 的复杂度是 O(n),每一个 Character 都是 unicode scalars 的序列
  • raw values 和 associated values 的区别
  • 如果必要,对于实现了 _ObjectiveCBridgeable 的 value types 会被自动桥接成 reference types
  • 讲一下 unowned 和 weak 的区别
  • 改 struct 的属性的方法名前要加 mutating,但如果这个 struct 用 let 声明的,改不了。修正:网友指出用 nonmutating set 也可以改属性。
  • nil 和 .None 的区别
  • capture list in closure
  • 举一个 guard ... where 的例子
@blackgear
blackgear / surge.conf
Created October 26, 2015 05:39
Surge config for new user
[General]
loglevel = warning
bypass-system = true
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.lan
bypass-tun = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
dns-server = 114.114.114.114,114.114.115.115
[Proxy]
PROXY = custom,服务器地址,服务器端口,加密方式,密码,模块地址,tcp-fast-open=true
@jason5ng32
jason5ng32 / surge.conf
Last active April 7, 2024 13:04
Surge Configs ( for 2.x )
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
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.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD
@soffchen
soffchen / surge.conf
Last active March 4, 2024 05:23
surge.conf
[General]
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
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]
BJ-All = custom
BJ-HK-Azure = custom
BJ-US-Azure = custom
@janlay
janlay / README.md
Last active May 11, 2024 03:22
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@onevcat
onevcat / ATS.plist
Last active January 12, 2018 12:32
Fuck off ATS
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
//
// JSON.swift
//
//
// Created by ZHANG Yi on 2015-9-1.
//
// The MIT License (MIT)
//
// Copyright (c) 2015 ZHANG Yi <zhangyi.cn@gmail.com>
//