Skip to content

Instantly share code, notes, and snippets.

View jistr's full-sized avatar

Jiří Stránský jistr

View GitHub Profile
@cwolferh
cwolferh / packstack-vms-build.bash
Last active December 14, 2015 21:39
RHEL64-based script to build and start 3 Fedora 18 VM's for packstack.
#!/bin/bash
#
# This script is intended to ultimately "just work" on RHEL6, setting
# up a grizzly openstack implementation on three Fedora 18 guest VM's
# using the packstack installer. It currently does not work due to a
# dependency error with openstack-nova-conductor not being available.
#
# It creates 3 Fedora-18 VM's for packstack/openstack-grizzly. Each
# has two nic's. The first nic is connected to the virt default
# network. The second is connected to the virt openstackvms network
@practicingruby
practicingruby / mrdi.md
Created December 19, 2012 22:29
Models, Roles, Decorators, and Interactions -- A modest proposal for a toned done version of DCI that isn't as janky as Concerns.

Models, Roles, Decorators, and Interactions

A modest alternative to DCI that might be worth further thought

One of the problems with advancing the discussion on DCI is that we lack a comparable alternative pattern that has the same goals, but favors a low ceremony approach. The closest thing we have to that is Rails concerns, but they are more like distant relatives of the DCI concepts rather than first cousins, and that makes comparisions between the two approaches not especially fruitful.

I am considering the idea of experimenting with my own paradigm that captures the intent and purity of DCI, but with the convenience of concerns. Please note that this is just the starting point of a conversation, it is NOT a promise of comercially available cold fusion or a cure for cancer. It's just a gist with an idea on it I'd like to hear your thoughts on.

What if we had a top-level topology that was split into Models, **Rol

@tomassedovic
tomassedovic / virt
Last active January 18, 2017 10:42 — forked from petrblaho/virip
Simple script for detecting IP address of running virtual machine
#!/bin/bash
if [[ $# == 0 ]]; then
echo Usage:
echo "virt <command> <vm> args"
echo Command is: ip, ssh, scp, sshfs
exit 1
fi
cmd="$1"; shift
@NZKoz
NZKoz / aa_instructions.md
Created May 2, 2012 03:07
Back Up All Your Gmail
  • Install getmail (aptitude install getmail4)
  • Set Up Your Imap Server (tl;dr)
  • getmail
  • ruby date_based_archive.rb ~/Maildir/.Archive
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@DAddYE
DAddYE / image_uploader.rb
Created December 30, 2011 22:57
CarrierWave on the fly resizer (work as dragonfly)
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :file
def thumb(size)
begun_at = Time.now
size.gsub!(/#/, '!')
uploader = Class.new(self.class)
uploader.versions.clear
uploader.version_names = [size]