Skip to content

Instantly share code, notes, and snippets.

cd /usr/local
wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
apt-get unzip
unzip glassfish-4.1.zip
rm glassfish-4.1.zip
glassfish4/bin/asadmin start-domain
glassfish4/bin/asadmin change-admin-password
glassfish4/bin/asadmin deploy some_war.war
glassfish4/bin/asadmin restart-domain
@kriben
kriben / router.ex
Created May 13, 2015 17:57
Nested resources in phoenix
defmodule HelloPhoenix.Router do
use HelloPhoenix.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
end
@kriben
kriben / video_pyopencv.py
Created November 30, 2011 18:10
Python opencv feed from webcam
import opencv
#this is important for capturing/displaying images
from opencv import highgui
import pygame
import sys
camera = highgui.cvCreateCameraCapture(0)
def get_image():
im = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.04+)