This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| class BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
| delegate :capture, :content_tag, :tag, to: :@template | |
| %w[text_field text_area password_field collection_select].each do |method_name| | |
| define_method(method_name) do |name, *args| | |
| errors = object.errors[name].any?? " error" : "" | |
| error_msg = object.errors[name].any?? content_tag(:span, object.errors[name].join(","), class: "help-inline") : "" | |
| content_tag :div, class: "clearfix#{errors}" do |
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| #!/usr/bin/ruby | |
| require "getoptlong" | |
| getoptlong = GetoptLong.new( | |
| [ '--target', '-t', GetoptLong::REQUIRED_ARGUMENT ], | |
| [ '--log-file', '-l', GetoptLong::REQUIRED_ARGUMENT ], | |
| [ '--source-root', '-r', GetoptLong::REQUIRED_ARGUMENT ] | |
| ) |
| jQuery(function($) { | |
| $('form[data-async]').live('submit', function(event) { | |
| var $form = $(this); | |
| var $target = $($form.attr('data-target')); | |
| $.ajax({ | |
| type: $form.attr('method'), | |
| url: $form.attr('action'), | |
| data: $form.serialize(), |
| (function($) { | |
| function parseImagesFromCSS(doc) { | |
| var i, j, | |
| rule, | |
| image, | |
| pattern = /url\((.*)\)/, | |
| properties = ['background-image', '-webkit-border-image'], | |
| images = {}; | |
| if (doc.styleSheets) { |
| /** | |
| * Modify the parts you need to get it working. | |
| */ | |
| var should = require('should'); | |
| var request = require('../node_modules/request'); | |
| var io = require('socket.io-client'); | |
| var serverUrl = 'http://localhost'; |
| /** | |
| * Helvetica Neue Normal (No Stretch) | |
| */ | |
| /* Helvetica Neue Black Font Stack */ | |
| .{font-family: "HelveticaNeueBlack", "HelveticaNeue-Black", "Helvetica Neue Black", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:800; font-stretch:normal;} | |
| /* Helvetica Neue Heavy Font Stack */ | |
| .{font-family: "HelveticaNeueHeavy", "HelveticaNeue-Heavy", "Helvetica Neue Heavy", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:700; font-stretch:normal;} |
| #!/usr/bin/env ruby | |
| require 'cinch' # gem install cinch --no-ri --no-rdoc | |
| require 'askwiki' # gem install askwiki --no-ri --no-rdoc | |
| bot = Cinch::Bot.new do | |
| configure do |c| | |
| c.server = "irc.freenode.org" | |
| c.nick = "Ask_wikipedia" | |
| c.channels = ["#cinch-bots"] |