Skip to content

Instantly share code, notes, and snippets.

View juanje's full-sized avatar

Juanje Ojeda juanje

View GitHub Profile
@rcmorano
rcmorano / docker-cheat-sheet.md
Last active July 28, 2022 13:23
my miscelaneous docker cheat sheet

rcmorano docker cheat sheet

Remove recursively zombie containers

In e.g.: you 'docker run -t -i' a 'bash' session and '.bashrc' is fucked up, container will forever respawn disallowing you to 'docker rmi' the used image .

docker rmi triangle/ubuntu-saucy-with-rvm 2>&1|grep ^Error|awk '{print $10}'|xargs docker rm
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,
@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"

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.

@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@willjohnson
willjohnson / README.md
Last active April 26, 2022 19:32
Server Status Widget for Dashing

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage

#!/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
@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
@acrmp
acrmp / 00_README.md
Created November 10, 2012 00:05
Mocking out a library in Chef

Example of mocking out a library in Chef so you can test the provider in isolation.

If you want to test the library itself you can do more normal Ruby things.

@ayosec
ayosec / config.ru
Created August 9, 2012 13:59
HAProxy basic example
# Simple web server
# Use N_ envvar to identify the process
run lambda {|env|
[ 200, {}, "Ok @ #{ENV["N_"]}"]
}