Skip to content

Instantly share code, notes, and snippets.

View hilen's full-sized avatar
😯
Work hard everyday.

Hilen Lai hilen

😯
Work hard everyday.
  • Hangzhou, China
View GitHub Profile
@hilen
hilen / openURL.md
Last active October 12, 2016 08:22
iOS URL Schemes
  • 电池电量 Prefs:root=BATTERY_USAGE
  • 通用设置 Prefs:root=General
  • 存储空间 Prefs:root=General&path=STORAGE_ICLOUD_USAGE/DEVICE_STORAGE
  • 蜂窝数据 Prefs:root=MOBILE_DATA_SETTINGS_ID
  • Wi-Fi 设置 Prefs:root=WIFI
  • 蓝牙设置 Prefs:root=Bluetooth
  • 定位设置 Prefs:root=Privacy&path=LOCATION
  • 辅助功能 Prefs:root=General&path=ACCESSIBILITY
  • 关于手机 Prefs:root=General&path=About
  • 键盘设置 Prefs:root=General&path=Keyboard
@hilen
hilen / cheatsheet.py
Created August 27, 2016 11:29 — forked from fuyufjh/cheatsheet.py
My Python Cheatsheet
Python Cheatsheet
=================
################################ Input & Output ###############################
name = input('please enter your name: ')
print('hello,', name)
ageStr = input('please enter your age: ')
age = int(ageStr)
[user]
name = Hilen
email = xx
[core]
excludesfile = /Users/hilenlai/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
@hilen
hilen / move_git_repo.sh
Last active May 12, 2016 08:01
移动 gitlab 的项目到其他 gitlab 服务器
#!/bin/sh
repo=$1
# token="yPgnGZ1PsQ123123REsvjdmTnT" #http://gitlab.mogujie.org/profile/account 找 private token
# test -z $repo && echo "Repo name required." 1>&2 && exit 1
# #获取 namespace_id: curl http://gitlab.mogujie.org/api/v3/namespaces?private_token=yPgnGZ1P123123sQREsvjdmTnT
# curl -H "Content-Type:application/json" http://gitlab.mogujie.org/api/v3/namespaces?private_token=$token -d "{ \"name\": \"$repo\", \"public\":\"true\", \"namespace\":{ \"id\": \"1448\",\"path\":\"$repo\"}}"
@hilen
hilen / UIBarButtonItem+Block.swift
Last active February 15, 2023 12:08
Custom UINavigationItem and custom back item with block . Swift 2.0
//
// UIBarButtonItem+Block.swift
// IllidanSpeed
//
// Created by Hilen on 12/10/15.
// Copyright © 2015 IllidanSpeed. All rights reserved.
//
import Foundation
@hilen
hilen / FLAnimatedImageView+SDWebImage.swift
Last active December 4, 2018 18:37
FLAnimatedImageView with SDWebImage
```
import Foundation
import FLAnimatedImage
import SDWebImage
import Kingfisher
/*
Add this repo(https://github.com/rs/SDWebImage) to your project
*/
extension FLAnimatedImageView {