A Dashing widget to show the total number of plays on your Soundcloud account.
https://github.com/soundcloud/soundcloud-ruby
Add it to your gemfile:
"twix".pluralize | |
# => "twixes" |
require 'nokogiri' | |
require 'open-uri' | |
uri = "http://data.gov.uk/dataset/water-framework-directive-lake-waterbodies-wfs" | |
doc = Nokogiri::HTML(open(uri)) | |
doc.search('link[rel=alternate]').each do |e| | |
if e[:type] == "application/rdf+xml" | |
puts "rdf should be #{e[:href]}" |
switch(json.rights.dataLicense) { | |
case "http://opendatacommons.org/licenses/by/": | |
$('#r_22_answer_id').val(34) | |
break; | |
case "http://opendatacommons.org/licenses/odbl/": | |
$('#r_22_answer_id').val(35) | |
break; | |
case "http://opendatacommons.org/licenses/pddl/": | |
$('#r_22_answer_id').val(36) | |
break; |
A Dashing widget to show the total number of plays on your Soundcloud account.
https://github.com/soundcloud/soundcloud-ruby
Add it to your gemfile:
require 'rubygems' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'date' | |
require 'uri' | |
require 'find' | |
@posts = {} | |
@drafts = {} |
<?php | |
/* | |
* Plugin Name: PB Responsive Images | |
* Plugin URI: http://wordpress.org/extend/plugins/pb-responsive-images/ | |
* Description: Adds support for the proposed responsive image format in post content, and helper functions for theme authors. | |
* Author: Phenomblue | |
* Version: 1.3 | |
* Author URI: http://www.phenomblue.com/ | |
* | |
* ------------------------------------- |
# Goes in app/helpers/jsonify_padrino.rb | |
require 'sinatra/base' | |
require 'jsonify/tilt' | |
class JsonifySinatra < Sinatra::Base | |
helpers do | |
def jsonify(*args) render(:jsonify, *args) end | |
end | |
end |
var url = phantom.casperArgs.args[0] | |
var output = phantom.casperArgs.args[0] | |
var casper = require('casper').create({ | |
pageSettings : { | |
userAgent : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11' | |
} | |
}); | |
casper.start(url, function() { |
mapit = Mapit.GetPostcode(params[:postcode]) | |
EARTH_RADIUS_M = 3959 | |
query[:latlng] = {'$nearSphere' => [mapit["lat"], mapit["lng"]], '$maxDistance' => Float(params[:within].to_i) / EARTH_RADIUS_M } | |
applications = Application.where(query) | |
@applications = applications.paginate({:order => :receiveddate.desc, :per_page=> 10, :page => params[:page]}) |
set :domain, "licensing.lichfield-001.vm.brightbox.net" | |
set :application, "licensing" | |
set :deploy_to, "/home/rails/#{application}" | |
set :user, "rails" | |
set :use_sudo, false | |
ssh_options[:forward_agent] = true | |
set :scm, :git |