Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function(){
});
@kaikousa
kaikousa / General Ant-build
Created April 22, 2009 15:50
General ant-build for packaging a project to a .jar-file
<?xml version="1.0" encoding="UTF-8"?>
<project name="" default="jar">
<description>
A general Ant-build file so I don't have to write it again from memory.
Project-layout:
-project
-src
-tests
@kaikousa
kaikousa / build.gradle
Created March 14, 2013 14:46
A Gradle script for running a Groovy-script that has dependencies (Jedis used for example).
apply plugin: 'groovy'
buildscript {
repositories { mavenCentral() }
dependencies {
classpath "redis.clients:jedis:2.0.0"
}
}
@kaikousa
kaikousa / gist:bf5ead17f93e6dbc52a9
Created September 16, 2014 14:18
Rsync selected files to a remote folder over SSH
#!/bin/sh
# Copy index.html and dist-folder to a remote folder. Exclude everything else
rsync -auv -e ssh --progress . --include=dist/*** --include=index.html --exclude=* user@example.com:/home/user/public_html/
@kaikousa
kaikousa / bootstrap.sh
Last active August 29, 2015 14:22
Provision a Vagrant + Ansible -ready Ubuntu-machine
#!/bin/sh
# Virtualbox for Vagrant
sudo apt-get install virtualbox
# Vagrant
sudo apt-get install vagrant
# Ansible
/*
* A very simple example of having a pool of workers perform jobs
* from the same channel. Simulates a situation where we have a long running
* process such as web server that receives requests and then posts the payloads
* to workers.
*/
package main
import (
"bufio"
@kaikousa
kaikousa / Dockerfile
Last active December 14, 2023 12:08
Install Terraform on Docker
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN wget --quiet https://releases.hashicorp.com/terraform/0.11.3/terraform_0.11.3_linux_amd64.zip \
&& unzip terraform_0.11.3_linux_amd64.zip \
&& mv terraform /usr/bin \