Skip to content

Instantly share code, notes, and snippets.

package models;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
/**
* Sample Employee bean to demostrate simple export features
*/
-- Logback: the reliable, generic, fast and flexible logging framework.
-- Copyright (C) 1999-2010, QOS.ch. All rights reserved.
--
-- See http://logback.qos.ch/license.html for the applicable licensing
-- conditions.
-- This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender
--
-- It is intended for Oracle 9i, 10g and 11g databases. Tested on version 9.2,
apply plugin: 'java'
apply plugin: 'scala'
// For those using Eclipse or IntelliJ IDEA
apply plugin: 'eclipse'
apply plugin: 'idea'
def findPlay20(){
def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null }
for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){
for(playExec in ['play.bat', 'play.sh', 'play']){
/*
* How to implement a session timeout in Play Framework 2
* http://www.poornerd.com/2014/04/01/how-to-implement-a-session-timeout-in-play-framework-2/
*
*/
public class Secured extends Security.Authenticator {
public static final String UNAUTHENTICATED = "unauthenticated";
public static User getLoggedInUser() {
#################################################################
#
# File: lib/api.rb
#
#################################################################
require 'user' # ActiveRecord model
# Connect to the db
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
cd ~/Library/Application\ Support
mkdir -p Avian/"Pristine Copy"/Bundles
cd Avian/Pristine\ Copy/Bundles
#clone groovy bundle
git clone https://github.com/textmate/groovy.tmbundle.git
#clone grails bundle
git clone https://github.com/textmate/groovy-grails.tmbundle.git

Setup Mac OS X Mountain Lion or Mavericks

Edit: I few months ago I got a new laptop and did the same thing on Mavericks.

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the

0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Hashtable;
import java.util.Random;
import java.util.Vector;
public class Markov {

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software