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
#!/usr/bin/env python | |
import select | |
import time | |
import psycopg2 | |
import psycopg2.extensions | |
import sys | |
def get_cursor(): | |
conn = psycopg2.connect("dbname=pgpubsub") |
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
class UUIDTest private() extends Record[UUIDTest] with KeyedRecord[String] { | |
override def meta = UUIDTest | |
val idField = new StringField(this, 36) { | |
override val defaultValue = UUID.randomUUID.toString | |
} | |
} | |
object UUIDTest extends UUIDTest with MetaRecord[UUIDTest] |
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 html><html><head><script> | |
window.onload = function load() { | |
window.open('', '_self', ''); | |
window.close(); | |
}; | |
</script></head><body></body></html> |
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
#app/controllers/application_controller.rb | |
class ApplicationController < ActionController::Base | |
def opensearch | |
response.headers['Content-Type'] = 'application/opensearchdescription+xml; charset=utf-8' | |
end |
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
package weden.jason.dbaseFuncTests | |
import org.testng.annotations.Test | |
import org.scalatest.testng.TestNGSuite | |
import org.apache.log4j.{Logger, LogManager} | |
import org.squeryl.adapters.PostgreSqlAdapter | |
import java.util.Date | |
import org.squeryl.{Schema, Session} | |
class ScalaFunctionalTests extends TestNGSuite { |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |