Skip to content

Instantly share code, notes, and snippets.

View Chun-Yang's full-sized avatar

yang2007chun Chun-Yang

View GitHub Profile
@Chun-Yang
Chun-Yang / sublime package list.txt
Created May 29, 2014 16:57
sublime package list
# sublime package list
Better CoffeeScript
DocBlockr
ERB Snippets
EasyMotion
Inc-Dec-Value
Select Quoted
Text Pastry
auto-save
@Chun-Yang
Chun-Yang / linux_command_get_filename_without_extension.txt
Created May 29, 2014 16:57
linux, sed ls, get filename without extension
ls | sed 's/\.[^.]*$//'
@Chun-Yang
Chun-Yang / rails_log.sublime-snippet
Created May 29, 2014 16:15
ruby rails add log for rails
<snippet>
<content><![CDATA[
Rails.logger.info "$0"
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>log</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby.rails, source.ruby</scope>
<description>Add Log For Rails</description>
</snippet>
<snippet>
<content><![CDATA[
System.out.println(${1:data});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>println</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.java</scope>
</snippet>
@Chun-Yang
Chun-Yang / separator.sublime-snippet
Created May 29, 2014 16:14
all add hyphen as spearator
<snippet>
<content><![CDATA[
---------------
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>--</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Add Hyphen As Separator</description>
</snippet>
<snippet>
<content><![CDATA[
public function ${1:name}() {
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>public</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
@Chun-Yang
Chun-Yang / js_log.sublime-snippet
Created May 29, 2014 16:13
js log without var
<snippet>
<content><![CDATA[
console.log("${1}");
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>log</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
@Chun-Yang
Chun-Yang / php_debug.sublime-snippet
Created May 29, 2014 16:13
php show data in pre tags
<snippet>
<content><![CDATA[
print "<pre>";
print_r(${1:data});
print "</pre>";
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>debug</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
@Chun-Yang
Chun-Yang / js_logv.sublime-snippet
Created May 29, 2014 16:12
js log with variable
<snippet>
<content><![CDATA[
console.log("${1}:");
console.log(${1});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>logv</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
<snippet>
<content><![CDATA[
do
$1
end
]]></content>
<tabTrigger>do</tabTrigger>
<scope>source.ruby</scope>
<description>do..end</description>
</snippet>