http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
| module ApplicationHelper | |
| def link_to_current_page(name, path) | |
| css_class = current_page?(path) ? 'class="active"' : '' | |
| raw("<li #{css_class}>#{link_to name, path}</li>") | |
| end | |
| end |
| <?php | |
| add_filter( 'manage_edit-orders_columns', 'admin_orders_header_columns', 10, 1); | |
| add_action( 'manage_orders_posts_custom_column', 'admin_orders_data_row', 10, 2); | |
| add_filter( 'manage_edit-orders_sortable_columns', 'admin_orders_sortable_columns' ); | |
| function admin_orders_header_columns($columns) | |
| { | |
| $columns = array( | |
| 'cb' => '<input type="checkbox" />', | |
| 'title' => __( 'Заказ' ), |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script> |
| module DeviseHelper | |
| def devise_error_messages! | |
| return '' if resource.errors.empty? | |
| messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join | |
| sentence = I18n.t('errors.messages.not_saved', | |
| count: resource.errors.count, | |
| resource: resource.class.model_name.human.downcase) | |
| html = <<-HTML |
| # Matching a Username | |
| /^[a-z0-9_-]{3,16}$/ | |
| # Matching a Password | |
| /^[a-z0-9_-]{6,18}$/ | |
| # Matching a Hex Value | |
| /^#?([a-f0-9]{6}|[a-f0-9]{3})$/ | |
| # Matching a Slug | |
| /^[a-z0-9-]+$/ | |
| # Matching an Email | |
| /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ |
#Landscaping With Frontend Development Tools
An opinionated list of tools for frontend (i.e. html, js, css) desktop/laptop (i.e. does not include tablet or phone yet) web development
##Coding Tools
######Workflow/Builds/Assemblers
| sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install google-chrome-stable |
| <?php | |
| /* Replace Built-In Scripts By Deregistering Them */ | |
| function my_scripts_method() { | |
| wp_deregister_script( 'jquery' ); | |
| wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery-new.js'); | |
| wp_enqueue_script( 'jquery' ); | |
| } | |
| add_action('wp_enqueue_scripts', 'my_scripts_method'); | |
| /* Force Perfect JPG Images */ |