This file contains hidden or 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
| ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| html = '' | |
| form_fields = %w(textarea input select) | |
| tag_elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css "label, " + form_fields.join(', ') | |
| tag_elements.each do |e| | |
| if e.node_name.eql? 'label' | |
| html = %(#{e}).html_safe | |
| elsif form_fields.include? e.node_name |
This file contains hidden or 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
| <template> | |
| <div id="app"> | |
| <p>{{ message }}</p> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| data: function () { | |
| return { |
This file contains hidden or 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
| logparser -i:W3C -o:csv "SELECT * INTO c:\temp\results.csv FROM c:\temp\myLogFile.log" |
This file contains hidden or 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
| Africa/Abidjan | |
| Africa/Accra | |
| Africa/Addis_Ababa | |
| Africa/Algiers | |
| Africa/Asmara | |
| Africa/Asmera | |
| Africa/Bamako | |
| Africa/Bangui | |
| Africa/Banjul | |
| Africa/Bissau |
This file contains hidden or 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 os | |
| class DetectFileTypeCommand(sublime_plugin.EventListener): | |
| """ Detects current file type if the file's extension isn't conclusive """ | |
| """ Modified for Ruby on Rails and Sublime Text 2 """ | |
| """ Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """ | |
| def on_load(self, view): | |
| filename = view.file_name() |
This file contains hidden or 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
| <textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
| ... | |
| <textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
| ... | |
| <script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
| <script> | |
| // Hook up ACE editor to all textareas with data-editor attribute | |
| $(function () { |
This file contains hidden or 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
| [merge] | |
| keepBackup = false | |
| tool = custom | |
| [mergetool "custom"] | |
| cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED" | |
| keepTemporaries = false | |
| trustExitCode = false | |
| keepBackup = false |
This file contains hidden or 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
| class RomanNumeral | |
| def self.add_roman(roman_number) | |
| result = 0 | |
| roman_number.each_char do |c| | |
| result += roman_lookup(c) | |
| end |
This file contains hidden or 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
| /** | |
| * Sass mixins | |
| */ | |
| @charset "UTF-8" | |
| // Force output of above line by adding a unicode character. ♫ | |
| // ----------------------------------------------- | |
| @mixin textFillColor($type) |
NewerOlder