Skip to content

Instantly share code, notes, and snippets.

@soffchen
soffchen / Surge.md
Last active August 10, 2023 13:56
Surge

Feature

  • 替代 PAC,实现根据规则区分选择代理线路
  • 支持 SOCKS5 和 Shadowsocks 协议
  • 完整支持所有的 Shadowsocks 加密方式 (table, rc4-md5, salsa20, chacha20, aes-256-cfb, aes-192-cfb, aes-128-cfb, bf-cfb, cast5-cfb, des-cfb, rc2-cfb, rc4, seed-cfb)
  • 全面支持双向 HTTP Keep-Alvie
  • 快,各种黑科技加速
  • 直接临时修改某个域名的访问规则 (暂时仅 Mac 版本)
  • 支持使用 GeoIP 规则决定线路

Usage

@keyboardr
keyboardr / HeadlessFragment.java
Last active December 31, 2021 01:05
A file template for creating a headless Fragment. The attach() methods add the fragment to the parent if it doesn't already exist and returns the attached fragment. The methods ensure that the parent implements the parent interface. If needed, parameters may be added to the attach() methods to supply fragment arguments.
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
#parse("File Header.java")
public class ${NAME} extends Fragment {
private static final String FRAG_TAG = ${NAME}.class.getCanonicalName();
@nkbt
nkbt / .eslintrc.js
Last active April 1, 2025 03:07
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@rafamaciel
rafamaciel / .editorconfig
Created March 17, 2015 12:42
Basic configuration of editorconfig to work with python
;
; Global Editor Config for Adaptive Labbers
;
; This is an ini style configuration. See http://editorconfig.org/ for more information on this file.
;
; Top level editor config.
root = true
; Always use Unix style new lines with new line ending on every file and trim whitespace
[*]
end_of_line = lf
@wenqinruan
wenqinruan / EduSoho-Project-Checklist.md
Last active October 20, 2015 09:38
EduSoho Project Checklist

#EduSoho项目checklist

作为一个开发人员,要严格遵循以下的检查清单

####General####

  • 代码是否顺利运行?是否能完成所期望的功能?逻辑是否正确?
  • 所有代码是否容易理解?
  • 代码是否符合编码规范或者代码风格是否统一?
  • 是否存在多余的或者重复的代码?
@wenqinruan
wenqinruan / EduSoho项目规范.md
Last active October 20, 2015 09:37
EduSoho项目规范

#EduSoho项目规范

####代码规范####

基本

  • 代码必须遵循PSR [PSR-1].
  • PHP,JS代码使用4个空格作为缩进,html和css使用2个空格作为缩进。
  • 一行代码长度要限制,通常情况应该是80字符以内,特殊情况,最大不能超过120个字符。
  • namespace申明之后必须要有一个空行,use申明块之后必须要有一个空行.
@penso
penso / Vagrantfile
Last active June 15, 2019 15:59
Vagrantfile for my local Rails development
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@bryanstern
bryanstern / OkHttpStack.java
Last active April 24, 2022 03:17
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is