Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View overtrue's full-sized avatar
🎯
Focusing

安正超 overtrue

🎯
Focusing
View GitHub Profile
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CSS: source.css
@overtrue
overtrue / gist:f540fbea3c33e3da53fd
Created January 12, 2015 09:23
移动端头部meta大全
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
<!-- 声明文档使用的字符编码 -->
<meta charset='utf-8'>
<!-- 优先使用 IE 最新版本和 Chrome -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<!-- 页面描述 -->
<meta name="description" content="不超过150个字符"/>
<!-- 页面关键词 -->
<?php
error_reporting(1);
$target = __DIR__ . '/../website.com'; // 生产环境web目录
$token = '您在coding填写的hook令牌';
$wwwUser = 'apache';
$wwwGroup = 'apache';
$json = json_decode(file_get_contents('php://input'), true);
@overtrue
overtrue / atom-style.less
Last active September 4, 2016 04:55
Editor Settings
// style the background color of the tree view
* {
// background-color: whitesmoke;
font-size: 11px;
font-family:"PingFang SC", "Helvetica Neue", "Hiragino Sans GB","Microsoft YaHei","Hiragino Kaku Gothic Pro", Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif;
}
// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
@overtrue
overtrue / sweetalert.util.js
Last active September 4, 2016 04:55
有用的js函数
var defaultTimer = 500000;
/**
* 成功消息
*
* @param {String} title
* @param {String} message
* @param {Integer} timer
*
* @return {boolean}
@overtrue
overtrue / Kernel.php
Last active September 4, 2016 04:55
PHP Tips
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel {
/**
* The application's global HTTP middleware stack.
@overtrue
overtrue / linux.md
Created May 8, 2015 03:21
问题集

sudo -Hu 执行时找不到命令

虽然在 /etc/profile 中加了全局 PATH,但是在以 sudo -Hu [username] [command] 执行的时候报命令不存在,原因是 /etc/sudoers 中还有一个 secure_path 没修改:

visudo

查找 secure_path,加入你要添加的目录,比如 /usr/local/bin:

@overtrue
overtrue / packgist.conf
Last active September 4, 2016 04:54
小脚本与配置文件
# 缓存
proxy_cache_path /tmp/nginx/cache keys_zone=one:5m
loader_threshold=300 loader_files=2000;
server {
listen *:80; #换成你的IP地址
client_max_body_size 100M;
server_name YOUR_DOMAIN.COM; #换成你的域名
charset utf-8;
error_page 500 502 503 504 /50x.html;
@overtrue
overtrue / 0_reuse_code.js
Last active September 4, 2016 04:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@overtrue
overtrue / surge_main.conf
Created October 27, 2015 07:57 — forked from jason5ng32/surge.conf
Surge Configs ( Both 2 files are needed )
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10
// DNS OVERRIDE, REMOVE # IF YOU NEED
# dns-server = 223.6.6.6,223.5.5.5,114.114.114.114,114.114.115.115
[Rule]