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
var DependencyManager = new Class({ | |
Implements: [Chain], | |
initialize: function(doc) { | |
var constructor = this.using.bind(this) | |
this.manager = this | |
this.document = $pick(doc, document) | |
if (!DependencyManager.aliases) DependencyManager.aliases = {} | |
if (!DependencyManager.dependencies) DependencyManager.dependencies = {} |
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
resources :tables do | |
match('/', :method => :options).to(:action => "LLLL") | |
end | |
OPTIONS /tables/ -> No routesm match the request |
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
#Extracts first sentence or a first phrase from given string and adds a link there | |
#to be used with RSS headings | |
class String | |
EXTRACT_SENTENCES = /\s*(?: - |- | -|[.,!?:]|&[a-z]*;)\s*/u.freeze | |
def associate_with_link(url, max = 30, title = nil) | |
return %{<a href="#{url}">#{self}</a>} if chars.size < max | |
sentenses = chars.split(EXTRACT_SENTENCES).delete_if {|i| i.empty?} | |
if sentenses.size == 1 || sentenses.last.chars.size > max |
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
Params: {"person_profile"=>{"city"=>"Boston", "work_phone"=>"+1 234 567 890", "country"=>"Russia", "birthday"=>"February 26, 1978", "site"=>"www.example.com", "organization"=>"Orwik", "mobile_phone"=>"+1 234 567 891"}, "format"=>nil, "person"=>{"name"=>"Yaroslaff Fedin", "email"=>"[email protected]"}, "teaching"=>{"0"=>{"from"=>"12 dec, 2007", "university"=>"Harvard", "to"=>"Jan 2008"}, "1"=>{"from"=>"Whhwhwh", "university"=>"Lol", "to"=>"laflalfalfaf"}}, "action"=>"update", "_method"=>"put", "id"=>"2e55b704-7dc2-48c1-b10f-0d082dff9b6f", "controller"=>"people"} |
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
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "http://dtd.nlm.nih.gov/publishing/2.0/journalpublishing.dtd"> | |
<article article-type="research-article" dtd-version="2.0" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<front> | |
<journal-meta> | |
<journal-id journal-id-type="publisher">pbio</journal-id> | |
<journal-id journal-id-type="allenpress-id">plbi</journal-id> | |
<journal-id journal-id-type="nlm-ta">PLOS Biol</journal-id> | |
<journal-id journal-id-type="pmc">plosbiol</journal-id> | |
<journal-title>PLoS Biology</journal-title> | |
<issn pub-type="ppub">1544-9173</issn> |
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
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "http://dtd.nlm.nih.gov/publishing/2.0/journalpublishing.dtd"> | |
<article article-type="research-article" dtd-version="2.0" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<front> | |
<journal-meta> | |
<journal-id journal-id-type="publisher">pbio</journal-id> | |
<journal-id journal-id-type="allenpress-id">plbi</journal-id> | |
<journal-id journal-id-type="nlm-ta">PLOS Biol</journal-id> | |
<journal-id journal-id-type="pmc">plosbiol</journal-id> | |
<journal-title>PLoS Biology</journal-title> | |
<issn pub-type="ppub">1544-9173</issn> |
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
user www www; | |
worker_processes 1; | |
pid /opt/local/var/run/nginx.pid; | |
error_log /opt/local/var/log/nginx/error.log info; | |
events { | |
worker_connections 16; | |
} | |
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
Moobber = new Class({ | |
options: { | |
server: 'soashable.com', | |
transport: { | |
clazz: Xmpp4Js.Transport.BOSH, | |
endpoint: "/http-bind/" | |
}, | |
account: null | |
}, | |
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
var PDFViewer = new Class({ | |
Extends: Swiff, | |
options: { | |
path: "/flashes/pdfviewer.swf", | |
/* | |
Events: | |
onLoad: fires on swf load | |
onReady: viewer is ready and loaded first few pages (happens on startup) | |
onRequest: started loading something (e.g. starting a new page) (viewer is busy), |
OlderNewer