Some CoffeeScript (verbosely commented for clarity)
# Override Rails handling of confirmation
$.rails.allowAction = (element) ->
# The message is something like "Are you sure?"
message = element.data('confirm')| $colors: ( | |
| white: white, | |
| gray1: rgb(238, 240, 242), | |
| gray2: rgb(187, 196, 201), | |
| gray3: rgb(162, 168, 172), | |
| gray4: rgb(110, 116, 120), | |
| accent: red | |
| ); | |
| @function c($key) { |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| $('body').on('click', 'a, img, button', function(e) { | |
| var $el = $(e.target); | |
| if($el.data('event-count')) { | |
| $el.data('event-count', ($el.data('event-count') + 1)); | |
| } else { | |
| $el.data('event-count', 1); | |
| } | |
| var category = e.target.nodeName; |
| #!/usr/bin/env ruby | |
| require 'fog' | |
| require 'open-uri' | |
| class BrandsmithDNS | |
| def initialize | |
| @dns = Fog::DNS.new(:provider => 'rackspace', :rackspace_api_key => 'xxxxxxxxxxxxxxxxxx', :rackspace_username => 'yyyyyyyyyyyyyyyyyy') | |
| @record = @dns.zones.get('11111111').records.get('A-222222222') | |
| end |
| var Plan = (function() { | |
| // protected | |
| var records = []; | |
| // the Plan constructor | |
| function Plan(key, id, price) { | |
| this.id = id; | |
| this.price = price; | |
| var more = key.split('||'); |
| sanitizeForDomID = (str) -> | |
| chars = | |
| "ä": "ae" | |
| "ö": "oe" | |
| "ß": "ss" | |
| "ü": "ue" | |
| "æ": "ae" | |
| "ø": "oe" | |
| "å": "aa" | |
| "é": "e" |
| <!-- | |
| PIE: CSS3 rendering for IE | |
| Version 1.0.0 | |
| http://css3pie.com | |
| Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2. | |
| --> | |
| <PUBLIC:COMPONENT lightWeight="true"> | |
| <!-- saved from url=(0014)about:internet --> | |
| <PUBLIC:ATTACH EVENT="oncontentready" FOR="element" ONEVENT="init()" /> | |
| <PUBLIC:ATTACH EVENT="ondocumentready" FOR="element" ONEVENT="init()" /> |
| function longestCommonPrefix(arr) { | |
| var prefix = ''; | |
| var firstWord = arr[0]; | |
| function inAll(letter, idx) { | |
| for(var j=0; j<arr.length; j++) { | |
| if(arr[j][idx] != letter) return false; | |
| } | |
| return true; | |
| } |
| Language.create!(name: 'English (US)', code: 'en', locale: 'en-US') if Language.count == 0 | |
| if Administrator.count == 0 | |
| admin = Administrator.new( | |
| first_name: 'Super', | |
| last_name: 'Admin', | |
| email: '[email protected]', | |
| password: 'adminpass', | |
| password_confirmation: 'adminpass' | |
| ) |