- A two-way binding is set up between
value
and the text in the editor. - Configure Ace in the
aceInit
callback.
Template
require 'nokogiri' | |
file = File.read("dirty.xml") | |
xml = Nokogiri::XML(file) | |
# xml.xpath("//location").each do |node| | |
# node.content = node.content.gsub(/\n\s+/, " ") | |
# end | |
File.open("clean.xml", "w") do |f| |
function valueFromObjectPath(obj, path) { | |
var steps = path.split(/\//); | |
var val = obj; | |
while (steps.length) { | |
var key = steps.shift(); | |
if (typeof(val[key]) !== 'undefined') { | |
val = val[ key ]; | |
} else { |
require('config/adapters/faye-adapter'); | |
export default DS.FayeAdapter.extend(); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<link href="styles.css" rel="stylesheet" type="text/css" /> | |
<title>"Percent complete" bar</title> | |
</head> |
desc "Generate a new key" | |
task :gen_key do | |
domain = get_env(:domain) | |
filename = "#{domain}.key" | |
`openssl genrsa -out #{filename} 2048` | |
end | |
desc "Generate a new CSR" | |
task :gen_csr => :gen_key do |
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
var position = $(this).position(); | |
var cssProps = { | |
top : position.top, | |
left : position.left, | |
opacity : '0.55' | |
}; | |
$(this).click(function() { | |
$(this).clone().css(cssProps).appendTo(this); | |
}); |
function logslider(pos) { | |
var minp = 0; | |
var maxp = 100; | |
var minv = Math.log(100); | |
var maxv = Math.log(10000000); | |
var scale = (maxv - minv) / (maxp - minp); | |
return Math.exp(minv + scale * (pos - minp)); | |
} |
I hereby claim:
To claim this, I am signing this object: