-
The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]
-
jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]
-
Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]
-
The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]
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
function processResults(k, r) { | |
var c = []; | |
for (var i=0; i < Object.keys(r).length; i++) { | |
c.push([k[i], r[k[i]]]); | |
} | |
return c; | |
} | |
function search(nameKey, myArray){ | |
for (var i=0; i < myArray.length; i++) { |
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
function search(nameKey, myArray){ | |
for (var i=0; i < myArray.length; i++) { | |
if (myArray[i].MarketName === nameKey) { | |
return myArray[i]; | |
} | |
} | |
} | |
function pullBittrex(market) { | |
var response = UrlFetchApp.fetch("https://bittrex.com/api/v1.1/public/getmarketsummaries"); |
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
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
push_button = 17 | |
led = 22 | |
GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) | |
GPIO.setup(led, GPIO.OUT) | |
last = False |
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
### | |
# You'll need the latest RPi.GPIO 0.5.2 | |
# See here for some info: | |
# http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio-part-2 | |
# | |
# In Pin 8 - Push Button to disarm | |
# In Pin 10 - Laser broken | |
# | |
# Out Pin 12 - Alarm | |
### |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'savon' | |
require 'pp' | |
url = "http://www.xignite.com/xFinancials.asmx?WSDL" | |
client = Savon::Client.new(url) | |
response = client.request :get_other_ratios do |
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
def truncate(string) | |
# do something wonderful here | |
end | |
string = string.gsub(/regex/, '\1') | |
puts "Hey check out <a href="#{string}">#{truncate(string)}</a>" |
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
$(document).ready(function() { | |
$.ajax({ | |
url: '/graphs/device1.json', | |
success: function (data) { load_chart(data) }, | |
cache: false | |
}); | |
}); | |