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
#!/bin/bash | |
#Set Defaults | |
requests=${requests:=10} | |
threads=${threads:=1} | |
url=${url:=http://testserver/} | |
while getopts "r:t:u:h" Option | |
do | |
case $Option in |
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
$(document).ready(function(){ | |
$.each($.browser, function(i, val) { | |
if(i=="mozilla") | |
// alert("Ikenna Do stuff for firefox 3 Now now") | |
$('#header').before('<br/><br/>'); | |
}); | |
$("#loading").ajaxStart(function(){ | |
$(this).append("<p><img src='/images/ajax-loader-2.gif' border='0' align='center' /></p>"); |
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
object AuthenticatedSession extends Loggable { | |
def logIn(credentialsOption: Option[Credentials]): Twitter = { | |
val (tw, credentials) = credentialsOption match { | |
case Some(cr) => | |
(createTwitter(Some(cr)), cr) | |
case None => | |
val requestToken = tw.getOAuthRequestToken | |
DesktopUtil.browse(requestToken.getAuthorizationURL) | |
(createTwitter(None), Dialog.showInput(null, "Enter the PIN from the Twitter authorization page in your browser", | |
"Enter PIN", Dialog.Message.Question, null, List[String](), "") match { |
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
import org.bowlerframework.view.squery.component.ValidationFeedbackPanel._ | |
import org.bowlerframework.view.squery.Component | |
import org.bowlerframework.RequestScope | |
class NewWidgetForm extends Component{ | |
val request = RequestScope.request | |
$("#errorPanel").contents = showErrorMessages | |
request.getSession.getValidatedModel match{ |
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 com.mojolly.backchat | |
package web | |
class MySocketIOClient extends Client { | |
def receive = { | |
case Connected => { | |
} | |
case Message(msg) => { | |
//handlePlainTextMessage |
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 com.mojolly.backchat | |
package web | |
import org.scalatra.ScalatraServlet | |
import akka.actor.{Scheduler, Actor} | |
import javax.servlet.http.{HttpServletResponse, HttpServletRequest} | |
import org.atmosphere.cpr.BroadcastFilter.BroadcastAction | |
import org.atmosphere.cpr._ | |
import org.atmosphere.util.XSSHtmlFilter | |
import collection.JavaConversions._ |
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
export RUBYOPT="rubygems" | |
rvm_install_on_use_flag=1 | |
if [ -z $(rvm gemset list | grep virtmachines) 2> /dev/null ]; then | |
rvm ruby-1.8.7 | |
rvm gemset create virtmachines | |
fi | |
rvm ruby-1.8.7@virtmachines |
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 backchat | |
package web | |
import javax.servlet.http.{ HttpServletResponse, HttpServletRequest } | |
import org.scalatra._ | |
import collection.JavaConversions._ | |
object CORSSupport { | |
val ORIGIN_HEADER: String = "Origin" | |
val ACCESS_CONTROL_REQUEST_METHOD_HEADER: String = "Access-Control-Request-Method" |
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
function die() | |
{ | |
echo "${@}" | |
exit 1 | |
} | |
# Add <strong>.old</strong> to any existing Vim file in the home directory | |
for i in $HOME/.vim $HOME/.vimrc $HOME/.gvimrc; do | |
if [[ ( -e $i ) || ( -h $i ) ]]; then | |
echo "${i} has been renamed to ${i}.old" |
OlderNewer