Skip to content

Instantly share code, notes, and snippets.

@knowuh
knowuh / gist:4999825
Created February 20, 2013 21:32
Class Path for Launcher
Library/Java/JavaVirtualMachines/1.6.0_31-b04-411.jdk/Contents/Home/bin/java -Dsailotrunk.otmlurl=file:///Users/npaessel/Documents/workspace2/otrunk-examples/Snapshot/bitmap-labbook-example.otml -Dotrunk.view.export_image=true -D_otrunk.view.author=true -Dotrunk.view.mode=student -Dotrunk.view.status=true -Djava.util.logging.config.file=/Users/npaessel/Documents/workspace2/otrunk-examples/Launchers/logging.properties -Dotrunk.debug.ignore_sail_view_mode=true -Dfile.encoding=UTF-8 -classpath /Users/npaessel/.m2/repository/org/telscenter/sail-otrunk/0.1.0-SNAPSHOT/sail-otrunk-0.1.0-SNAPSHOT.jar:/Users/npaessel/Documents/workspace2/otrunk/target/classes:/Users/npaessel/.m2/repository/jug/jug/1.1.2/jug-1.1.2.jar:/Users/npaessel/.m2/repository/org/concord/frameworkview/0.1.0-SNAPSHOT/frameworkview-0.1.0-SNAPSHOT.jar:/Users/npaessel/.m2/repository/org/concord/loader/0.1.0-SNAPSHOT/loader-0.1.0-SNAPSHOT.jar:/Users/npaessel/.m2/repository/org/concord/swing/0.1.0-SNAPSHOT/swing-0.1.0-SNAPSHOT.jar:/Users/npaessel/.m2/r
{
"title": "What is Pressure?",
"publicationStatus": "public",
"subtitle": "Explore how gas exerts pressure on the sides of a container.",
"about": "[\"Gases have no definite shape or volume. When they are constrained to a container, we can measure the pressure they exert on the container walls.\", \"The model shows the inside (yellow atoms) and outside (pink atoms) of a balloon. The green barrier represents the wall of the balloon.\", \"Add atoms to the balloon (the number of atoms in the balloon is shown on the slider). What happens to the balloon wall when atoms are added?\"]",
"components": [
{
"type": "checkbox",
"id": "show-velocity",
"text": "Show Velocity",
@knowuh
knowuh / capybara.rb
Created November 30, 2012 18:52
capybara.rb
# ~/.capybara.rb
case ENV['SELENIUM_CONFIG']
when 'saucelabs-ie'
Capybara.server_port = ENV['RAILS_PORT'].to_i
Capybara.app_host = "http://app#{Capybara.server_port}.test.dev.concord.org"
selenium_remote :url => "http://ccdev:[email protected]:80/wd/hub",
:desired_capabilities => Selenium::WebDriver::Remote::Capabilities.internet_explorer(:platform => "WINDOWS")
when 'ff6'
puts "----- using Firefox 6 profile ---- "
Selenium::WebDriver::Firefox.path= '/usr/local/bin/firefox6'
@knowuh
knowuh / portal.properties
Created November 28, 2012 18:09
Portal Properties (non-mail-related)
########## portal properties ##########
# This section is for portal definitions
# portal.name - name of portal instance
# portal_baseurl - hosted webapp location, viewable by browser. ex: if it's running locally http://clearwise.dev.concord.org:8080/webapp
# vlewrapper_baseurl - hosted vlewrapper location, viewable by browser. ex: if it's running locally http://clearwise.dev.concord.org:8080/vlewrapper
# curriculum_base_dir - absolute server path to the curriculum folder that you created. ex: /home/userx/apache-tomcat-6.0.29/webapps/curriculum
# curriculum_base_www - hosted curriculum location, viewable by browser. ex: if running locally, http://clearwise.dev.concord.org:8080/curriculum
# send_email_enabled - [true/false] set to false if and only if you DO NOT want any email sent from this portal.
# send_email_on_exception - [true/false] do you want email to be sent when there are errors?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18722 deploy 20 0 841m 191m 1532 S 0 11.3 111:38.17 ruby
32111 deploy 20 0 565m 147m 1292 S 0 8.7 74:10.57 ruby
32117 deploy 20 0 570m 147m 1388 S 0 8.7 73:00.84 ruby
16575 root 20 0 1005m 1580 0 S 2 0.1 72:18.75 PassengerHelper
29 root 20 0 0 0 0 S 0 0.0 24:50.49 kswapd0
6946 deploy 20 0 1189m 209m 1120 S 0 12.4 7:14.05 ruby
@knowuh
knowuh / activiy_launch_log_parser.rb
Created October 29, 2012 19:10
activiy_launch_log_parser.rb
#!/usr/bin/env ruby
require 'uri'
require 'nokogiri'
require 'net/http'
require 'pry'
require 'active_support/inflector'
LAUNCH_REGEX = /"(?<url>.*offerings\/(?<offering_id>[0-9]+)\.jnlp[^"]*)" for\s+(?<ip>[0-9|.]*)\s+at\s+(?<date>\d{4}-\d{2}\-\d{2})\s+(?<time>\d{1,2}:\d{1,2}:\d{1,2})/
@host_url = "http://rites-investigations.staging.concord.org"
{
"type": "mysystem2",
"prompt": "<h1>Scrolling HTML instruction text goes here.</h1>\nYeah, you can include images too!\n\n<img src=\"http://www.lekraken.com/wp-content/uploads/2009/05/turumaki.gif\">\n\n",
"modules": [
{
"name": "Glucose",
"icon": "http://dl.dropbox.com/u/73403/mysystem/images/egg-transp-70.png",
"image": "assets/glucose.png",
"xtype": "MySystemContainer",
"etype": "source",
@knowuh
knowuh / justAgraph.json
Created August 28, 2012 21:21
just a graph
{
"type": "Activity",
"name": "Only a graph",
"authorName": "Noah",
"pages": [
{
"type": "Page",
"name": "Graph of y = -3 * x + 2",
"text": "Here is a graph of y = -3 * x + 2.",
"panes": [
@knowuh
knowuh / jsp_error.log
Created July 30, 2012 20:26
jsp error when admin visits /webapp/teacher/management/library.html
org.apache.jasper.JasperException: /WEB-INF/jsp/tels/teacher/management/projectlibrarydisplay.jsp(929,6) The function getKey must be used with a prefix when a default namespace is not specified
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$ValidateVisitor$1FVVisitor.visit(Validator.java:1518)
org.apache.jasper.compiler.ELNode$Function.accept(ELNode.java:129)
org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:200)
org.apache.jasper.compiler.ELNode$Visitor.visit(ELNode.java:242)
org.apache.jasper.compiler.ELNode$Root.accept(ELNode.java:56)
org.apache.jasper.compiler.ELNode$Nodes.visit(ELNode.java:200)
@knowuh
knowuh / branchingerror.json
Created July 10, 2012 14:56
converter tool branching error?
"steps": [
{
"url": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page/step/1",
"activityPage": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page",
"beforeText": "Construct a line with y-interept 0.0, with slope 1.0",
"...":"...",
"submitButtonTitle": "Check My Answer",
"defaultBranch": "/shared/activity-with-a-line-construction-tool/page/1-this-is-the-first-page/step/5",
"...":"...",
"responseBranches": [