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 / pkg.youdomain.com.conf
Created February 17, 2017 09:27
Packagist proxy template for nginx vhost.
proxy_cache_path /tmp/nginx/cache keys_zone=one:200m
loader_threshold=300 loader_files=2000;
server {
listen *:80;
client_max_body_size 100M;
server_name pkg.yourdomain.com; # YOUR HOST
charset utf-8;
location / {
proxy_cache one;
@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]
@overtrue
overtrue / SetLocale.php
Last active August 6, 2017 13:16
常用组件
<?php
namespace App\Http\Middleware;
use App;
use Closure;
use Illuminate\Http\Response;
class SetLocale
{
@overtrue
overtrue / Model.php
Last active October 17, 2017 02:48
Model methods
<?php
namespace App\Models;
class Model
{
public static function withoutEvents(Closure $closure)
{
$dispatcher = self::getEventDispatcher();
JPEG2000 image files,00 00 00 0C 6A 50 20 20,JP2,Picture
3GPP multimedia files,00 00 00 14 66 74 79 70,3GP,Multimedia
MPEG-4 v1,00 00 00 14 66 74 79 70 69 73 6F 6D,MP4,Multimedia
3rd Generation Partnership Project 3GPP,00 00 00 14 66 74 79 70,3GG|3GP|3G2,Multimedia
Windows Disk Image,00 00 00 00 14 00 00 00,TBI,Windows
MPEG-4 video_1,00 00 00 18 66 74 79 70,3GP5|M4V|MP4,Multimedia
MPEG-4 video_2,00 00 00 1C 66 74 79 70,MP4,Multimedia
3GPP2 multimedia files,00 00 00 20 66 74 79 70,3GP,Multimedia
Apple audio and video,00 00 00 20 66 74 79 70 4D 34 41,M4A,Multimedia
3rd Generation Partnership Project 3GPP2,00 00 00 20 66 74 79 70,3GG|3GP|3G2,Multimedia
@overtrue
overtrue / description.sh
Created June 1, 2018 06:13
Fix omf background color
set fish_pager_color_progress cyan
@overtrue
overtrue / get_scroll_offset.js
Created June 18, 2018 23:43 — forked from yuktse/get_scroll_offset.js
js 获取页面滚动高度
var scrollTop = window.pageYOffset
|| document.documentElement.scrollTop
|| document.body.scrollTop
|| 0;
var scrollLeft = window.pageXOffset // netscape
|| document.documentElement.scrollLeft
|| document.body.scrollLeft
|| 0;
/*
@overtrue
overtrue / Preferences.sublime-settings
Last active February 16, 2019 08:11
Sublime Setting
{
"always_show_minimap_viewport": true,
"atomic_save": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
@overtrue
overtrue / .gitignore
Created May 31, 2016 12:00
global gitignore
# 设置方法:
# git config --global core.excludesfile ~/.gitignore_global
#compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so