Skip to content

Instantly share code, notes, and snippets.

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,
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
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
(body \ "teacherInterest").extractOpt[String] match {
case Some(teacherInterest) => {
MatygoSchema.teacherApplications.insert(new TeacherApplicaiton(user.id, teacherInterest))
}
case None => {}
}
// scalatra
get("/myStaticUrl/:url"){
redirect_to(prams("url")
}
//
def redirect_to
redirect_to "/applicationrout\##{params[:url}"
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) => {
var $ = function(selector){
return page.evaluate(function(){
return $(selector);
});
};
console.log($(".suites"));
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
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.
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'