Skip to content

Instantly share code, notes, and snippets.

View deanmarano's full-sized avatar
🦏

Dean Marano deanmarano

🦏
  • Grand Rapids, MI
  • 13:36 (UTC -04:00)
View GitHub Profile
App.FormRoute = Ember.Route.extend
model: (params)-> @store.get('form', params.id)
renderTemplate: (controller, model)->
this.render "forms/#{model.get('formVersion')}/#{model.get('formName')}"
{{#link-to path object tagName='li'}}
{{#link-to path object}}
{{yield}}
{{/link-to}}
{{/link-to}}
{:ssl-client-cert nil, :remote-addr \"127.0.0.1\", :scheme :http, :context \"/file-sharing-service/files\", :multipart-params {}, :request-method :post, :query-string \"\", :route-params {}, :content-type \"text/plain; charset=UTF-8\", :path-info \"/\", :uri \"/file-sharing-service/files\", :server-name \"accounting-app1-staging.snc1\", :params {}, :headers {\"user-agent\" \"Apache-HttpClient/4.2.2 (java 1.5)\", \"host\" \"accounting-app1-staging.snc1:5000\", \"content-type\" \"text/plain; charset=UTF-8\", \"content-length\" \"8347\", \"user-uuid\" \"26c62164-d71f-48e8-8854-e650f36620b8\", \"accept-encoding\" \"gzip, deflate\", \"connection\" \"close\"}, :content-length 8347, :server-port 5000, :character-encoding \"UTF-8\", :body #<ReusableInputStream org.immutant.web.ReusableInputStream@5de69e66>}
{:ssl-client-cert nil, :remote-addr \"10.20.32.17\", :scheme :http, :context \"/file-sharing-service/files\", :multipart-params {\"file-data\" {:size 8125, :tempfile #<File /tmp/ring-multipart-6304585165691814722
-5-----0--0--5-----0-
-7--6--5--5--7--3--5-
-6--7--6--6--6--4--6-
-7--7--7--5--7--4--7-
-5--x--x--x--5--x--x-
----7--5--5-----3--5-
@deanmarano
deanmarano / unshorten.js
Created May 5, 2012 17:53
Node.js URL unshortening function
var http = require("http"),
url = require("url");
function unshortenUrl(unshortedUrl, returnFunction) {
var urlObj = url.parse(unshortedUrl);
var options = {
host: urlObj.host,
port: urlObj.port,
path: urlObj.pathname
};