Keeping Windows Awake (with PowerShell)

The story

I got a new game on Steam and got set to downloading it.
For some reason, Steam and Windows have decided that it's better to save some electricity and put my computer to sleep, rather than finish my game.
Today I discovered that instead of playing my ...

more ...

Chef "Share This" script

I wrote this little script to upload the current cookbook to the Chef Supermarket.
It should be run from within the cookbook's directory.

#!/bin/bash
knife cookbook site share -o ../ $(basename $(realpath .)) -c ~/.chef/knife-supermarket.rb

Interesting points:

  • I'm using a specific Knife config file (that references the ...
more ...

Dry Run for Python Pip

As I wrote some time ago, I started my own python cookbook for Chef because I didn't like the direction the "default" one was going.
I recently added a new feature that I wanted to talk about. I called it smart_install in the cookbook, but it's actually a ...

more ...

Some Jenkins helpers for Chef

I've decided to share some code I use in Chef to pull some data and files from Jenkins

JenkinsQuery

This is a helper class, in charge of getting build-related data

# slasher_development/libraries/jenkins_query.rb

module SlasherDevelopment
  class JenkinsQuery
    def initialize(server,user,password,job)
      @scheme='https' # Modify if needed ...
more ...

Filtering in Shell

Today I told someone that a feature I'm missing in Bash is filtering.
Then I thought about how much I miss it, so I went ahead and "implemented" it.

Filtering in other lanaugaes

Basically, I'm referring to taking a collection/stream of items, running some code on every ...

more ...

Cookbook Versioning Script

The Problem

I've always disliked releasing cookbook versions manually. The process requires a lot of bureaucratic steps which are easy to forget and require no thought at all.
Before I had this script, I sometimes avoided modifying the cookbook's version when I only applied "a little fix", losing ...

more ...


Running external Ruby code from Vagrant

The Story

Like a lot of Chef users, I'm using Vagrant for testing my cookbooks. I'm also using Berkshelf for providing the Vagrant box with the cookbooks it needs.
Until recently, I was happy using the ChefDK-provided Berlshelf (v4.0.1). I stopped being happy when running berks ...

more ...


Chef Custom Resources - Missing Documentation

The new Chef documentation for Custom Resources is pretty lackluster.
This is probably because they're too busy making awesome stuff, but I still needed to learn some stuff the hard way.
Thought I'd share them.

The basics

There is no longer a "state-only" resource and an implementing provider ...

more ...