Skip to content

Instantly share code, notes, and snippets.

@if540
if540 / URL.js
Last active February 8, 2017 00:44 — forked from Rplus/URL.js
// got website url you can
// var path = window.location.pathname; // Returns path only
// var url = window.location.href; // Returns full URL
// var page = path.split("/").pop(); // Returns page only
var url = "http://example.com:3000/pathname/?search=test#hash";
var _a = new URL(url);
_a.protocol; // => "http:"
@if540
if540 / .bowerrc
Last active August 29, 2015 14:08 — forked from facultymatt/.bowerrc
Bower.io 套件管理 & Grunt 任務管理
{
"directory": "components",
"analytics": false
}
$bgcolor: hsl(53,56%,87%);
.button-primary {
background: $bgcolor;
color: if(lightness($bgcolor) < 50%, white, black);
}
import sublime, sublime_plugin, os, re
class FileNameComplete(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
completions = []
sel = view.sel()[0].a
if "string" in view.syntax_name(sel):
pass
@if540
if540 / Default (Windows).sublime-keymap
Last active December 17, 2015 18:09 — forked from anonymous/Default (OSX).sublime-keymap
Default (Windows).sublime-keymap - Windows環境下的按鍵設定檔
[
{ "keys": ["ctrl+super+left"], "command": "move_tab", "args": {"mod": -1} },
{ "keys": ["ctrl+super+right"], "command": "move_tab", "args": {"mod": 1} }
]