Skip to content

Instantly share code, notes, and snippets.

View EkkoG's full-sized avatar

Ekko EkkoG

View GitHub Profile
@EkkoG
EkkoG / duoshuo.css
Created January 25, 2016 08:20
duoshuo.css
/**
* Duoshuo Comments Style for Amaze UI
* by Minwe
*/
#ds-thread #ds-reset .ds-post-button {
font-family: Microsoft JHenghei, Microsoft YaHei, "Helvetica Neue",Helvetica,Arial,sans-serif; }
#ds-thread #ds-reset .ds-textarea-wrapper textarea, #ds-thread #ds-reset .ds-textarea-wrapper .ds-hidden-text {
display: block;
font-family: Microsoft JHenghei, Microsoft YaHei , "Helvetica Neue",Helvetica,Arial,sans-serif;}
#ds-thread #ds-reset .ds-meta {
@EkkoG
EkkoG / neo_configuration_example
Created February 3, 2016 02:03
neo_configuration_example
"Note: This option must set it in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)!
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Use smartcase.
let g:neocomplete#enable_smart_case = 1
" Set minimum syntax keyword length.
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
@EkkoG
EkkoG / inboundDetour
Created February 3, 2016 02:37
inboundDetour
{
"protocol": "vmess",
"port": "10000-20000", // 端口范围
"tag": "detour", // 此传入协议的标签,在第二部分中会用到
"settings": {
"clients": [ // clients 部分和原有的配置的一样
{
"id": "33d41456-039b-4496-beae-37b26eba22a0",
"alterId": 100,
"level": 1
#!/bin/bash
currentInterface=$(networksetup -listnetworkserviceorder | \
awk -F'\\) ' '/\(1\)/ {print $2}')
state=$(networksetup -getwebproxy wi-fi | grep "No")
HTTP_PORT=6152
SOCK_PORT=6153
@EkkoG
EkkoG / bump_version.sh
Last active August 11, 2016 03:02
bump_version.sh
#! /bin/sh
#
# bump_version.sh
#
# Distributed under terms of the MIT license.
#
if [ $CONFIGURATION == Release ]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber +
@EkkoG
EkkoG / smtp.py
Created August 10, 2016 15:36
smtp.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------
# 程序:Python SMTP 发送带附件电子邮件
# 作者:Jason Hu
# 日期:2016-06-01
# 语言:Python
# 说明:Python内置对SMTP的支持,可以发送纯文本邮件、HTML邮件以及带附件的邮件
#---------------------------------------------------------------------
CPYCustomTableHeadView *head = [[CPYCustomTableHeadView alloc] init];
// 绑定数据
head.data = data;
// 告诉布局系统需要马上布局
[head setNeedsLayout];
[head layoutIfNeeded];
self.tableView.tableHeaderView = head;
@EkkoG
EkkoG / surf.conf
Last active August 24, 2016 16:51 — forked from networkextension/surf.conf
surf.conf
# A.BIG.T rule config
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: error,warning, notify, info, verbose (默认值: info)
loglevel = info
# 跳过某个域名或者 IP 段,这些目标主机将不会由 A.BIG.T 处理。
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
# 强制使用特定的 DNS 服务器
#!/bin/bash
usage()
{
echo "git commit,可使用 -d 附加信息类型,如:
-d add [添加]
-d mod [修改]
-d fix [修复]" 1>&2;
exit 1;
}
#!/bin/bash
usage()
{
echo "usage: 使用命令行提交 Merge Request,参数如下:
-p 源工程 ID
-s 源工程分支
-d 目标工程 ID
-t 目标工程分支
-u 用户 ID