Skip to content

Instantly share code, notes, and snippets.

View juanje's full-sized avatar

Juanje Ojeda juanje

View GitHub Profile
#!/bin/bash
# file: /usr/share/lxc/templates/lxc-ubuntu-cycle
#
# template script for generating ubuntu container for LXC
#
# This script consolidates and extends the existing lxc ubuntu scripts
#
# Copyright © 2011 Serge Hallyn <serge.hallyn@canonical.com>
# Copyright © 2010 Wilhelm Meier

Install routing plugin

yum install rubygem-openshift-origin-routing-activemq.noarch

Create routing-plugin configuration file

cp /etc/openshift/plugins.d/openshift-origin-routing-activemq.conf.example /etc/openshift/plugins.d/openshift-origin-routing-activemq.conf

Add routinginfo user into activemq.xml configuration file. See files below.

@stevendborrelli
stevendborrelli / boot2docker.json
Last active December 31, 2015 02:08
Packer.io json template for boot2docker
{
"builders": [{
"type": "virtualbox",
"guest_os_type": "Linux",
"iso_url": "https://github.com/steeve/boot2docker/releases/download/v0.3.0/boot2docker.iso",
"iso_checksum": "e03670ed349c54848e20d9043a90f2df8df70d82e674b84a7083301193745b19",
"iso_checksum_type": "sha256",
"ssh_username": "docker",
"ssh_password": "tcuser",
"shutdown_command": "sudo poweroff"
@fnichol
fnichol / README.md
Created February 5, 2012 20:50
Vagrant apt-cacher-ng

Vagrant apt-cacher-ng Box

Simple and easy, just:

mkdir apt-cacher-ng && cd apt-cacher-ng
curl -LO https://raw.github.com/gist/1747868/Vagrantfile
vagrant up

Tail the logs perhaps?

@danielsdeleo
danielsdeleo / gist:2920702
Created June 12, 2012 23:06
Eval and Converge a Single Chef Recipe
#!/usr/bin/env ruby
recipe_path = ARGV[0]
if recipe_path.nil?
STDERR.puts "usage: chef-apply RECIPE_FILE"
exit 1
end
recipe_path = File.expand_path(recipe_path)
@webframp
webframp / reposplit.sh
Created December 15, 2011 03:37
Bash script to split multi-cookbook repo into individual git repos, retaining history, and uploads to github
#!/bin/bash
for cookbook_dir in `ls community-cookbooks`; do
if [ $cookbook_dir != 'readme.md' ]; then
REPO=chef-$cookbook_dir
git clone --no-hardlinks ./community-cookbooks/ $REPO
SAVEDIR=`pwd`
cd $REPO
git filter-branch --subdirectory-filter $cookbook_dir HEAD -- --all --prune-empty
git reset --hard
@mattetti
mattetti / rack_example.ru
Created December 8, 2011 13:58
Very basic rack application showing how to use a router based on the uri and how to process requests based on the HTTP method used.
#########################################
# Very basic rack application showing how to use a router based on the uri
# and how to process requests based on the HTTP method used.
#
# Usage:
# $ rackup rack_example.ru
#
# $ curl -X POST -d 'title=retire&body=I should retire in a nice island' localhost:9292/ideas
# $ curl -X POST -d 'title=ask Satish for a gift&body=Find a way to get Satish to send me a gift' localhost:9292/ideas
# $ curl localhost:9292/ideas
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,
@masonforest
masonforest / Dockerfile
Last active March 18, 2020 16:34
Test Drive Your Dockerfiles with RSpec and ServerSpec
FROM ubuntu:14.04
MAINTAINER Mason Fischer <mason@thoughtbot.com>
RUN apt-get update && apt-get install -y nodejs
@brobertsaz
brobertsaz / serversetup.md
Last active July 6, 2020 08:56
Ubuntu 12.04 Ruby, Rails, Nginx, Unicorn

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key