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 Application extends Controller { | |
val FBAppId = "AppIdGoesHere" | |
val FBAppSecret = "FBAppSecretGoesHere" | |
def fbLogin = Action {Redirect("https://www.facebook.com/dialog/oauth?scope=user_birthday,email,user_about_me,user_location,offline_access,publish_stream,user_education_history,user_checkins" + | |
"&client_id="+FBAppId+"&redirect_uri="+URLEncoder.encode("http://domainname.com/fbLogin/code","UTF-8"))} | |
def fbLoginCode(code:String) = Action{response => | |
val ws = WS.url("https://graph.facebook.com/oauth/access_token?client_id="+FBAppId+"&redirect_uri" + |
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 controllers | |
import play.api._ | |
import play.api.mvc._ | |
import com.novus.salat._ | |
import com.novus.salat.global._ | |
import com.novus.salat.dao._ | |
import util._ |
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.nascency.incipit | |
import com.twitter.finagle.{Service, SimpleFilter} | |
import org.jboss.netty.handler.codec.http._ | |
import org.jboss.netty.handler.codec.http.HttpResponseStatus._ | |
import org.jboss.netty.handler.codec.http.HttpVersion.HTTP_1_1 | |
import org.jboss.netty.buffer.ChannelBuffers.copiedBuffer | |
import org.jboss.netty.util.CharsetUtil.UTF_8 | |
import com.twitter.util.Future | |
import java.net.InetSocketAddress |
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/sh | |
# | |
# An example hook script that is called after a successful | |
# commit is made. | |
# | |
# To enable this hook, rename this file to "post-commit". | |
path="path to application" | |
User="userforssh" | |
server="servername" | |
dist="/Users/justin/Apps/Play20/play dist" |
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 | |
unzip -o filename-1.0 | |
chmod a+x filename-1.0/start | |
gline=$(ps -ewwo pid,args | grep "play.core.server.NettyServer") | |
echo $gline | |
IN=$gline | |
set -- "$IN" | |
IFS=" "; declare -a Array=($*) | |
PlayProcess="$(ps -ewwo pid,args | grep "play.core.server.NettyServer")" | |
echo $PlayProcess |
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 com.lmax.disruptor.dsl.Disruptor | |
import java.util.concurrent.Executors | |
import com.lmax.disruptor._ | |
import com.mongodb.casbah.Imports._ | |
import voldemort.client._ | |
object Main { | |
val bootstrapUrl = "tcp://localhost:6666" | |
val factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl)); | |
val client = factory.getStoreClient[String, String]("test"); |
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 controllers | |
import play.api._ | |
import play.api.mvc._ | |
import com.excilys.ebi.gatling.core.Predef._ | |
import com.excilys.ebi.gatling.http.Predef._ | |
import com.excilys.ebi.gatling.jdbc.Predef._ | |
import com.excilys.ebi.gatling.core.result.message.RunRecord | |
import com.excilys.ebi.gatling.charts.report.ReportsGenerator | |
import com.excilys.ebi.gatling.core.runner.{Selection, Runner} |
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
sudo du -h | grep "[\0-9\]G" | |
find -name *.war -exec scp '{}' [email protected]:webapps ';' | |
find -name *.jmx -exec sh ${JENKINS_HOME}/jmeter/bin/jmeter -n -t {} -l ${WORKSPACE}/{}.jtl ';' | |
awk '/MemTotal:/{total=$2} \ | |
/MemFree:/{free=$2} \ | |
END{ \ | |
print "free:"(free*100/total)","; |
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
# Documentation for HAProxy | |
# http://code.google.com/p/haproxy-docs/w/list | |
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt | |
# NOTES: | |
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems) | |
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice |
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 ruby | |
require 'rubygems' | |
require 'json' | |
require 'net/http' | |
url = URI.parse("http://marathon.apps.company.com/v2/tasks") | |
req = Net::HTTP::Get.new(url.path) | |
req.add_field("Accept", "application/json") | |
res = Net::HTTP.new(url.host, url.port).start do |http| | |
http.request(req) |
OlderNewer