Created
August 25, 2017 16:33
-
-
Save srabuini/b9e7c16d0d5173de95f15c8574f5d5b5 to your computer and use it in GitHub Desktop.
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
'.text.html': | |
'Make a label tag': | |
'prefix': 'lab' | |
'body': '<%= f.label :$1 %>' | |
'New scaffold :new': | |
'prefix': 'new' | |
'body': """ | |
<div class="page-header"> | |
<%= link_to ${1:resource}_path, class: \'btn btn-default pull-right\' do %> | |
<span class="glyphicon glyphicon-list-alt"></span>Volver | |
<% end %> | |
<h1>Nuev${2:gender} ${3:ModelName}</h1> | |
</div> | |
<%= render \'form\' %> | |
""" | |
'New scaffold :edit': | |
'prefix': 'edit' | |
'body': """ | |
<div class="page-header"> | |
<%= link_to ${1:resource}_path, class: \'btn btn-default pull-right\' do %> | |
<span class="glyphicon glyphicon-list-alt"></span>Volver | |
<% end %> | |
<h1>Editando ${3:ModelName}</h1> | |
</div> | |
<%= render \'form\' %> | |
""" | |
'New row': | |
'prefix': 'row' | |
'body': """ | |
<div class="row-fluid"> | |
<div class="span2"> | |
$1 | |
</div> | |
</div> | |
""" | |
'.source.ruby, .source.ruby.rails, .source.css': | |
'Puts data': | |
'prefix': '---' | |
'body': 'puts "----------"\nputs $1\nputs "----------"' | |
'Puts asset_path': | |
'prefix': 'ap' | |
'body': '<%= asset_path(\'$1\') %>' | |
'test do..end': | |
'prefix': 'test' | |
'body': 'test \'${1:something}\' do\n\t$0\nend' | |
'assert_equal': | |
'prefix': 'ase' | |
'body': 'assert_equal ${1:expected}, ${2:actual}' | |
'Make parameters mehtod': | |
'prefix': 'stp' | |
'body': 'def $1_params\n\tparams.require(:$1).permit(:$2)\nend' | |
'Set object': | |
'prefix': 'seto' | |
'body': 'before_action :set_${1:object}, only: [:show, :edit, :update, :destroy]\n\ndef set_${1:object}\n\t@${1:object} = ${1:object}.find(params[:id])\nend' | |
'Add params: {}': | |
'prefix': 'pp' | |
'body': 'console.log(\'%j\', ${1:Object});$2' | |
'.source.ruby': | |
'debug with marks': | |
'prefix': '--' | |
'body': 'logger.debug \'-\' * 80\nlogger.debug $0\nlogger.debug \'-\' * 80\n' | |
'describe do..end': | |
'prefix': 'describe' | |
'body': 'describe \'${1:something}\' do\n\t$0\nend' | |
'it do..end': | |
'prefix': 'it' | |
'body': 'it \'${1:something}\' do\n\t$0\nend' | |
'reporter': | |
'prefix':'reporter' | |
'body': """require 'minitest/reporters' | |
Minitest::Reporters.use! [ | |
Minitest::Reporters::DefaultReporter.new(detailed_skip: false) | |
]""" | |
'.source.crystal': | |
'struct .. end': | |
'prefix': 'struct' | |
'body': 'struct ${1:StructName}\n\t$0\nend' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment