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
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u172-b11/a58eab1ec242421181065cdc37240b08/jdk-8u172-linux-x64.rpm | |
# Install Java | |
sudo rpm -i jdk-8u172-linux-x64.rpm | |
# Check if the default java version is set to sun jdk |
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
/** | |
The Play (2.3) json combinator library is arguably the best in the scala world. However it doesnt | |
work with case classes with greater than 22 fields. | |
The following gist leverages the shapeless 'Automatic Typeclass Derivation' facility to work around this | |
limitation. Simply stick it in a common location in your code base, and use like so: | |
Note: ** Requires Play 2.3 and shapeless 2.1.0 | |
import SWrites._ | |
import SReads._ |
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
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and PHP-FPM | |
sudo yum install -y nginx php56-fpm | |
# Install PHP extensions | |
sudo yum install -y php56-devel php56-mysql php56-pdo \ | |
php56-pear php56-mbstring php56-cli php56-odbc \ |
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
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.rpm | |
# Install Java | |
sudo rpm -i jdk-7u80-linux-x64.rpm | |
# Check if the default java version is set to sun jdk |
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
# Upstart script for a play application that binds to an unprivileged user. | |
# put this into a file like /etc/init/play.conf | |
# | |
# This could be the foundation for pushing play apps to the server using something like git-deploy | |
# By calling service play stop in the restart command and play-start in the restart command. | |
# | |
# Usage: | |
# start play | |
# stop play | |
# restart play |
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
SASLAuthentication.registerSASLMechanism(SASLXFacebookPlatformMechanism.NAME, SASLXFacebookPlatformMechanism.class); | |
SASLAuthentication.supportSASLMechanism(SASLXFacebookPlatformMechanism.NAME, 0); | |
ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com", 5222); | |
config.setSASLAuthenticationEnabled(true); | |
config.setDebuggerEnabled(false); | |
XMPPConnection conn = null; | |
try { | |
conn = new XMPPConnection(config); |
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 common; | |
import play.Logger.ALogger; | |
import play.api.Play; | |
public class MyLoggerJ { | |
private static final BLogger logger = of("application"); | |
/** |
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
var SHOPINION_DOMAIN="a.shopinionapp.com"; // either "j." or "" for j.shopinionapp.com or shopinionapp.com | |
var friends = null; | |
var friendsName = []; | |
var loadingPusher=false; | |
var xhr; | |
var head = document.getElementsByTagName('head')[0]; | |
var initialized = false; | |
var counter = 0; | |
var idList = new Array(); |
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
var SHOPINION_DOMAIN="a.shopinionapp.com"; // either "j." or "" for j.shopinionapp.com or shopinionapp.com | |
var friends = null; | |
var friendsName = []; | |
var loadingPusher=false; | |
var xhr; | |
var head = document.getElementsByTagName('head')[0]; | |
var initialized = false; | |
var counter = 0; | |
var idList = new Array(); |
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 java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Map; | |
import java.util.UUID; | |
import java.util.concurrent.Callable; |
NewerOlder