This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Insert text to new file | |
### ---------------------------------------------------- | |
### ==================================================== | |
import sublime | |
import sys | |
view = sublime.active_window().new_file() | |
def insert_text(view): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
npm install karma-jasmine --save-dev | |
npm install karma-chrome-launcher --save-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See http://www.shellperson.net/using-sudo-with-an-alias/ | |
alias sudo='sudo ' | |
# This helps me edit files that my user isn't the owner of | |
alias edit='SUDO_EDITOR="open -FWne" sudo -e' | |
# The alias that takes me here - to editing these very aliases | |
alias edit_profile='open -e ~/.profile' | |
# I do a lot of web development, so I need to edit these non-owned files fairly often |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HurryHenryHooray { | |
const SEQ_START = 1; // 报数的起始值 | |
const SEQ_END = 100; // 报数的结束値 | |
private $map = []; // 保存数字与字符串的对应关系 | |
public function HurryHenryHooray ($num1, $num2, $num3) { | |
if ( $this->isValid($num1) && $this->isValid($num2) && $this->isValid($num3) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var $player = $('#J_playTracksList'), | |
$controls = $player.find('.ui-track-control'); | |
$player.off('click.xm.hate').on('click.xm.hate', '.no-more', function() { | |
var id = $(this).closest('.ui-track-item').data('sid'); | |
$.get('http://www.xiami.com/kuang/unlike', $.param({id: id})); | |
console.log('unlike id:', id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************** | |
author: linkarys | |
description: framework of javascript | |
date begin: 2012-9-8 | |
**************************************************************/ | |
/* ============================================================================= | |
Shortcuts | |
========================================================================== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["alt+x"], "command": "open_browser" }, | |
{ "keys": ["ctrl+k", "ctrl+t"], "command": "title_case" }, | |
{ "keys": ["alt+shift+j"], "command": "move_to", "args": {"to": "bol"}}, | |
{ "keys": ["alt+shift+k"], "command": "move_to", "args": {"to": "eol"}}, | |
{ "keys": ["ctrl+shift+r"], "command": "reindent" , "args": {"single_line": false}}, | |
{ "keys": ["ctrl+alt+f"], "command": "pep8_autoformat" }, | |
{ "keys": ["alt+shift+;"], "command": "run_macro_file", "args": {"file": "Packages/User/addnewlinewithsemi.sublime-macro" } }, | |
{ "keys": ["alt+shift+l"], "command": "run_macro_file", "args": {"file": "Packages/User/addnewline.sublime-macro" } }, | |
{ "keys": ["ctrl+shift+l"], "command": "run_macro_file", "args": {"file": "Packages/User/addnewlinewithcolon.sublime-macro" } }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! ryan.css v1.1.0 */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
html{background: none;height: 100%;} | |
::selection{background:#78a8a8;color:#f7f3e7;text-shadow:none;} | |
::-moz-selection{background:#78a8a8;color:#f7f3e7;text-shadow:none;} | |
::-webkit-selection{background:#78a8a8;color:#f7f3e7;text-shadow:none;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
import webbrowser | |
class openBrowser(sublime_plugin.TextCommand): | |
def run(self, edit): | |
url = self.view.file_name(); | |
webbrowser.open_new(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AdvanceNewFile | |
Netus Fetch | |
Gist | |
SulimetLinter | |
ClipBoard History |
OlderNewer