I hereby claim:
- I am ijonas on github.
- I am ijonas (https://keybase.io/ijonas) on keybase.
- I have a public key whose fingerprint is DE26 F284 D61B 9703 78D7 B94C E3AC 4853 1526 EB62
To claim this, I am signing this object:
#! /usr/bin/env ruby | |
# license: MIT | |
# example usage: ./logrotateconf $PWD/newrelic_agent.log > newrelic_agent | |
conf = <<-eos | |
{ | |
rotate 14 | |
daily | |
missingok | |
create 640 ubuntu ubuntu | |
notifempty |
I hereby claim:
To claim this, I am signing this object:
class Product < ActiveRecord::Base | |
validates :title, :description, :image_url, :presence=> true | |
validates :price, :numericality => {:greater_than_or_equal_to => 0.01} | |
validates :title, :uniqueness => true | |
validates :image_url, format: { | |
:with => %r{\.(gif|jpg|png)\Z}i, | |
:message => 'must be a url' | |
} | |
def ordered_by_title |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "opscode/ubuntu1404" | |
config.vm.network "forwarded_port", guest: 80, host: 8090 | |
config.vm.network "forwarded_port", guest: 3306, host: 3306 | |
config.vm.network "forwarded_port", guest: 9200, host: 9200 |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
r := rand.New(rand.NewSource(99)) |
if configBytes, err := ioutil.ReadFile(fmt.Sprintf("%s/%s", os.Getenv("HOME"), ".ddknife")); err == nil { | |
for _, row := range strings.Split(string(configBytes), "\n") { | |
if tuple := strings.Split(row, "="); len(tuple) == 2 { | |
configFileSettings[tuple[0]] = tuple[1] | |
} | |
} | |
} |
# after launching an Ubuntu 12.04 instance and ssh-ing into the VM | |
apt-get update | |
apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring | |
reboot | |
# ssh-ing back into the VM | |
sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
sh -c "echo deb http://get.docker.io/ubuntu docker main /etc/apt/sources.list.d/docker.list" | |
apt-get update | |
apt-get install lxc-docker |
class Kisselbugger | |
def something_that_evaluates_to_true | |
# ... | |
end | |
def decide_and_do_something | |
# several hours of looking at line 9 results in a: "AArgh, ya wee bugger. Not again!" | |
if not something_that_evaluates_to_true | |
do_the_true_response |
# MySQL service | |
# | |
# Version 0.0.1 | |
FROM ubuntu | |
MAINTAINER support@caseblocks | |
RUN dpkg-divert --local --rename --add /sbin/initctl | |
RUN ln -s /bin/true /sbin/initctl |
# MongoDB | |
# | |
# VERSION 0.0.1 | |
# | |
# requires mongodb.conf @ https://gist.github.com/ijonas/6844358 | |
FROM ubuntu | |
MAINTAINER [email protected] | |
# make sure the package repository is up to date |