Skip to content

Instantly share code, notes, and snippets.

@varokas
varokas / gist:1586471
Created January 10, 2012 02:27
Installing Node.js to work with coffeescript
--> OS X
brew node
==> Caveats
Please add /usr/local/lib/node to your NODE_PATH environment variable to have node libraries picked
curl http://npmjs.org/install.sh | sh
npm install -g coffee-script
then run
coffee
https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
@varokas
varokas / gist:1603757
Created January 12, 2012 23:17
play framework
install
http://scala.playframework.org/documentation/scala-0.9.1/install
@varokas
varokas / gist:1707842
Created January 31, 2012 00:35
Groovy as shell script
#!/usr/bin/env groovy
//Grape: http://groovy.codehaus.org/Grape
//Don't forget to chmod +x (this file)
import com.google.common.collect.HashBiMap
@Grab(group='com.google.code.google-collections', module='google-collect', version='snapshot-20080530')
def getFruit() { [grape:'purple', lemon:'yellow', orange:'orange'] as HashBiMap }
@varokas
varokas / gist:2025991
Created March 13, 2012 01:16
DAO-Business
interface StudentDAO {
public Iterable<Student> getStudentsByClass(String cls);
}
class StudentDAOTest {
//mock: Database (or use in-memory database)
//test that SQL works and queries the right thing
@Test public void testGetStudentByClassReturnsAllStudentsInClass() {}
@Test public void testGetStudentByClassThrowsExceptionWhenClassIsNull() {}
@varokas
varokas / gist:2231217
Created March 28, 2012 22:43
linux java7
here is a similar question on how to install JRE 7.
Install the JDK
Download he 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension i.e. "[java-version]-i586.tar.gz" for 32bit and "[java-version]-x64.tar.gz" for 64bit
Uncompress it
tar -xvf jdk-7u2-linux-i586.tar.gz (32bit)
tar -xvf jdk-7u2-linux-x64.tar.gz (64bit)
@varokas
varokas / gist:2626776
Created May 7, 2012 08:58
ubuntu setup
$sudo update-rc.d -f gdm remove
$sudo update-rc.d gdm defaults
@varokas
varokas / gist:2648497
Created May 9, 2012 20:15
lighttpd php
This is a how-to to on installing and setting up lighttpd and PHP on Maverick. Lighttpd or "lighty" is a webserver with a very low use of resources.
Install the packages we need: (this may not be all, but these two will automatically download the rest as dependencies)
sudo apt-get install lighttpd php5-cgi
Enable the fastcgi module and the php configuration with
sudo lighty-enable-mod fastcgi
sudo lighty-enable-mod fastcgi-php
Reload the lighttpd daemon
http://www.thegeekstuff.com/2011/07/rsync-over-ssh-without-password/
brew install ssh-copy-id
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.200.10
http://cm-anthill.cobaltgroup.com:8080/rest/workflow/1393/buildlives