Skip to content

Instantly share code, notes, and snippets.

View EkkoG's full-sized avatar

Ekko EkkoG

View GitHub Profile
@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邮件以及带附件的邮件
#---------------------------------------------------------------------
@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 +
#!/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 / 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
@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 / 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 / pdnsd
Created January 22, 2016 15:56
pdnsd
#!/bin/sh /etc/rc.common
START=65
NAME=pdnsd
DESC="proxy DNS server"
PDNSD_LOCAL_PORT=7453
DAEMON=/usr/sbin/pdnsd
PID_FILE=/var/run/$NAME.pid
@EkkoG
EkkoG / shadowsocks-local
Created January 22, 2016 15:47
shadowsocks-local
#!/bin/sh /etc/rc.common
START=95
SERVICE_USE_PID=1
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
CONFIG=/etc/shadowsocks.json
@EkkoG
EkkoG / dns2socks
Created January 22, 2016 13:45
dns2socks
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=90
SERVICE_USE_PID=1
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
start() {
@EkkoG
EkkoG / homebrew.mxcl.pdnsd.plist
Created September 24, 2015 04:00 — forked from fujimogn/homebrew.mxcl.pdnsd.plist
Installing pdnsd from Homebrew

Installing pdnsd from homebrew as root user.

$ brew install pdnsd

$ sudo chown -R nobody /usr/local/var/cache/pdnsd

$ curl -L http://goo.gl/kMlyQ -o pdnsd.conf
$ mv pdnsd.conf /usr/local/etc
$ sudo chown root /usr/local/etc/pdnsd.conf