Skip to content

Instantly share code, notes, and snippets.

@mizzy
mizzy / Rakefile
Last active August 29, 2015 13:55
require "bundler/gem_tasks"
require "bundler/gem_helper"
require 'rspec/core/rake_task'
require 'octokit'
Octokit.configure do |c|
c.login = `git config --get github.user`.strip
c.access_token = `git config --get github.token`.strip
end
@mizzy
mizzy / test.pp
Last active August 29, 2015 13:56
package { 'nginx':
ensure => installed,
}
service { 'nginx':
enable => true,
ensure => running,
}
package "nginx" do
action :install
end
service "nginx" do
action [ :enable, :start ]
end
require 'specinfra'
include SpecInfra::Helper::DetectOS
include SpecInfra::Helper::Exec
backend.check_os
describe package('apache2') do
it { should be_installed }
end
describe file('/etc/apache2/apache2.conf') do
it { should be_sourced_from 'apache2.conf' }
end
install 'apache2'
copy_file 'apache2.conf', '/etc/apache2/apache2.conf'
require 'specinfra'
include SpecInfra::Helper::Ubuntu
include SpecInfra::Helper::Dockerfile
backend.from 'ubuntu'
backend.install 'apache2'
#!/bin/sh
apt-get -y install apache2
FROM ubuntu
RUN apt-get -y install apache2
@mizzy
mizzy / 0_reuse_code.js
Created March 20, 2014 06:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console