This file contains hidden or 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
select | |
(select @offeringId) as offeringId, | |
(select @userId) as userId, | |
(select id from discussion where offeringId = @offeringId) as discussionId, | |
(select role from offering_to_user where offeringId = @offeringId and userId = @userId) as roleId, | |
(select studentId from offering_to_user where offeringId = @offeringId and userId = @userId) as studentId, | |
(select c.title from course c, offering o where o.courseId = c.id and o.id = @offeringId) as title, | |
(select c.subject from course c, offering o where o.courseId = c.id and o.id = @offeringId) as subject, | |
(select courseId from offering where id = offeringId) as courseId, | |
(select price from offering where id = offeringId) as price, |
This file contains hidden or 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
button, a.button | |
+border-radius(5px, 5px) | |
+box-shadow(0px 1px 1px #999) | |
text-align: center | |
position: relative | |
display: inline-block | |
border: none | |
font-family: $blueprint-font-family | |
font-size: 14px | |
color: #333 |
This file contains hidden or 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 button(id, text, klass) | |
return "<button id='#{id}' type='button' name='#{id}' class='#{klass}'><div class='background hover'></div><div class='background active'></div><div class='label'>#{text}</div></button>".html_safe | |
end | |
def button_link(id, text, klass, url) | |
return "<a id='#{id}' href='#{url}' class='button #{klass}'><div class='background hover'></div><div class='background active'></div><div class='label'>#{text}</div></a>".html_safe | |
end |
This file contains hidden or 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
(body \ "teacherInterest").extractOpt[String] match { | |
case Some(teacherInterest) => { | |
MatygoSchema.teacherApplications.insert(new TeacherApplicaiton(user.id, teacherInterest)) | |
} | |
case None => {} | |
} |
This file contains hidden or 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
// scalatra | |
get("/myStaticUrl/:url"){ | |
redirect_to(prams("url") | |
} | |
// | |
def redirect_to | |
redirect_to "/applicationrout\##{params[:url}" |
This file contains hidden or 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
class GPlusController(val dispatcher:FlowDispatcher) extends FlowController { | |
// show | |
get("/posts/:id/googlePlus") { | |
val post = Post.find(params("id")) | |
val offering = post.getOffering() | |
val redirectUrl = FlowAuthentication.userFromRequest(request, response) match { | |
case Some(user) if (offering != None) => { |
This file contains hidden or 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 $ = function(selector){ | |
return page.evaluate(function(){ | |
return $(selector); | |
}); | |
}; | |
console.log($(".suites")); |
This file contains hidden or 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
0x00 SYN URGP=0 | |
[463192.436147] [UFW BLOCK] IN=eth0 OUT= MAC=00:1b:21:07:f4:29:00:05:74:94:35:00:08:00 SRC=142.103.6.79 DST=67.205.96.132 LEN=60 TOS=0x00 PREC=0x00 TTL=51 ID=39925 DF PROTO=TCP SPT=42140 DPT=113 WINDOW=5840 RES=0x00 SYN URGP=0 | |
[463193.855685] [UFW BLOCK] IN=eth0 OUT= MAC=00:1b:21:07:f4:29:00:05:74:94:35:00:08:00 SRC=142.103.6.79 DST=67.205.96.132 LEN=60 TOS=0x00 PREC=0x00 TTL=51 ID=53929 DF PROTO=TCP SPT=56598 DPT=113 WINDOW=5840 RES=0x00 SYN URGP=0 | |
[463201.929489] [UFW BLOCK] IN=eth0 OUT= MAC=00:1b:21:07:f4:29:00:05:74:94:35:00:08:00 SRC=142.103.6.79 DST=67.205.96.132 LEN=60 TOS=0x00 PREC=0x00 TTL=51 ID=33984 DF PROTO=TCP SPT=57027 DPT=113 WINDOW=5840 RES=0x00 SYN URGP=0 | |
[466421.817548] [UFW BLOCK] IN=eth0 OUT= MAC=00:1b:21:07:f4:29:00:05:74:94:35:00:08:00 SRC=142.103.6.79 DST=67.205.96.132 LEN=60 TOS=0x00 PREC=0x00 TTL=51 ID=6146 DF PROTO=TCP SPT=42048 DPT=113 WINDOW=5840 RES=0x00 SYN URGP=0 | |
[467339.506124] [UFW BLOCK] IN=eth0 OUT= MAC=00:1b:21:07:f4:29:00:05:74:94:35:00:08:00 SRC=142.1 |
This file contains hidden or 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
WAR [20111205-02:45:12.876] util: org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException | |
WAR [20111205-02:45:12.876] util: at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:110) | |
WAR [20111205-02:45:12.876] util: at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:283) | |
WAR [20111205-02:45:12.876] util: at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:298) | |
WAR [20111205-02:45:12.876] util: at org.eclipse.jetty.io.UncheckedPrintWriter.print(UncheckedPrintWriter.java:463) | |
WAR [20111205-02:45:12.876] util: at org.scalatra.ScalatraKernel$$anonfun$renderPipeline$1.apply(ScalatraKernel.scala:325) | |
WAR [20111205-02:45:12.876] util: at scala.PartialFunction$$anon$3.apply(PartialFunction.scala:67) | |
WAR [20111205-02:45:12.876] util: at scala.PartialFunction$$anon$3.apply(PartialFunction.scala:66) | |
WAR [20111205-02:45:12.876] util: at org.scalatra.ScalatraKernel$class.loop$1(ScalatraKernel.scala:307) | |
WAR [20111205-02:45:12. |
This file contains hidden or 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
require 'net/http' | |
conn = Net::HTTP.new("https://wwww.matygo.com", 80) | |
conn.use_ssl = true | |
puts conn.get("/offerings") | |
/Users/joe/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:678:in `connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) | |
from /Users/joe/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:678:in `block in connect' | |
from /Users/joe/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/timeout.rb:44:in `timeout' |