Skip to content

Instantly share code, notes, and snippets.

View maoueh's full-sized avatar

Matthieu Vachon maoueh

View GitHub Profile
@maoueh
maoueh / chef-stacktrace.out
Last active August 29, 2015 14:08
Resource execute rights problem (cat /var/chef/cache/chef-stacktrace.out)
Generated at 2014-11-03 10:19:02 -0500
Mixlib::ShellOut::ShellCommandFailed: execute[user1 reads file with owner user2 and group user2 with mode 0440] ((chef-apply cookbook)::(chef-apply recipe) line 25) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of cat /tmp/testfile ----
STDOUT:
STDERR: cat: /tmp/testfile: Permission denied
---- End output of cat /tmp/testfile ----
Ran cat /tmp/testfile returned 1
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.6.0/lib/mixlib/shellout.rb:272:in `invalid!'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.6.0/lib/mixlib/shellout.rb:259:in `error!'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/mixin/shell_out.rb:43:in `shell_out!'
@maoueh
maoueh / chef-apply recipe.rb
Last active August 29, 2015 14:08
Resource execute rights problem (chef-apply recipe.rb)
[2014-11-03T10:19:02-05:00] WARN: Cloning resource attributes for group[user1] from prior resource (CHEF-3694)
[2014-11-03T10:19:02-05:00] WARN: Previous group[user1]: recipe.rb:1:in `run_chef_recipe'
[2014-11-03T10:19:02-05:00] WARN: Current group[user1]: recipe.rb:7:in `run_chef_recipe'
[2014-11-03T10:19:02-05:00] WARN: Cloning resource attributes for group[user2] from prior resource (CHEF-3694)
[2014-11-03T10:19:02-05:00] WARN: Previous group[user2]: recipe.rb:2:in `run_chef_recipe'
[2014-11-03T10:19:02-05:00] WARN: Current group[user2]: recipe.rb:13:in `run_chef_recipe'
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* group[user1] action create
- alter group group[user1]
- replace group members with new list of members
@maoueh
maoueh / Gemfile
Last active May 30, 2022 08:50
Simple Ruby files to statically serve files
source "https://rubygems.org"
gem 'rack', '~> 1.5'
gem 'rack-cache', '~> 1.2'
gem 'puma', '~> 2.7'
@maoueh
maoueh / Gemfile
Last active August 29, 2015 13:57
Extra Windows packages to put in Gemfile for Chef (or Chef dependent) applications
# Add at the end of the Gemfile if ruby is complaining about
# missing Windows packages like win32-api.
# Pick if Ruby 1.9.x x86 via WindowsInstalle. Usually, versions are not required
platforms :mingw_19 do
gem 'rdp-ruby-wmi', '= 0.3.1'
gem 'win32-dir', '= 0.3.7'
gem 'win32-event', '= 0.5.2'
gem 'win32-mutex', '= 0.3.1'
gem 'win32-service', '= 0.7.2'
@maoueh
maoueh / gist:8336174
Created January 9, 2014 15:42
Patch to avoid making a backup of all repositories in gitlab when performing the backup operation. Applied to version `6.3.1` of Gitlab (exact commit `09c6f663e97a`)
From 1ca587494508103e72c7cea688a9ce163b539d16 Mon Sep 17 00:00:00 2001
From: Matthieu Vachon <[email protected]>
Date: Sun, 29 Dec 2013 19:59:00 -0500
Subject: [PATCH] Removed repositories backup code
---
lib/backup/manager.rb | 2 +-
lib/tasks/gitlab/backup.rake | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
@maoueh
maoueh / gist:8260199
Last active March 31, 2022 12:30
OpenELEC (4.0.1) WIFI connection details using `connman`

Even though there is a nice XBMC add-on to configure your WIFI settings, sometimes, you may still want to setup the WIFI connection for many reasons or just for fur.

OpenELEC use connman for managing connection to the various available network.

Setuping connman to connect to your protected WIFI network is an easy requiring you only to create a config file and enter some commands in a shell.

require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << 'test'
end
desc "Run tests"
task :default => :test