This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -w | |
# encoding=utf8 | |
# vim: ts=4 sw=4 sts=4 et: | |
# count-ext : Compte le nombre de fichiers ayant une extension donnée | |
# ainsi que la taille total des fichiers par extension. | |
# | |
# Date : 2011/03/01 | |
# | |
# Copyright (C) 2011 Farzad FARID <ffarid@pragmatic-source.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby1.9 -w | |
# encoding: utf-8 | |
# vim: ts=4 sw=4 sts=4 et: | |
# Sort a dictionnary by the number of consecutive voyels. | |
# | |
# Date: 28/01/2011 | |
# | |
# Copyright (C) 2011 Farzad FARID <ffarid@pragmatic-source.com> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Daily MySQL backup tool | |
# | |
# Author: Farzad FARID <ffarid@pragmatic-source.com> | |
# Date: 04/11/2010 | |
##################################################################### | |
# PARAMETRAGE BASH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Resource script for Apache | |
# | |
# Description: Manages Apache as an OCF resource in | |
# an Active-Passive High Availability setup. | |
# | |
# Author: F.BOLE | |
# License: GNU General Public License (GPL) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.pragmatic-source.MailImapTunnel</string> | |
<key>RunAtLoad</key> | |
<true/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Lance une commande avec plusieurs variables d'environnement sans polluer le shell principal. | |
( | |
TOTO=1 | |
TUTU=2 | |
FOO=bar | |
export TOTO TUTU FOO | |
./ma_commande |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check this out, rvm use rbx | |
ruby_block "rvm use rbx" do | |
block do | |
Chef::Mixin::Command.popen4('bash -l -c "rvm use 1.9.1 && env"') do |p,i,o,e| | |
o.each_line do |line| | |
env_bits = line.split("=") | |
ENV[env_bits[0]] = env_bits[1] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chef | |
module Mixin | |
module Language | |
# esearch(:node, 'role\[admin\]') | |
# recursively search for this role/recipe in all roles | |
def esearch(context, search) | |
if context == :role | |
ret = [] | |
# First solve all roles: | |
roles = search(:role, search) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Usage: gemspec [-s] GEMNAME | |
# | |
# Prints a basic gemspec for GEMNAME based on your git-config info. | |
# If -s is passed, saves it as a GEMNAME.gemspec in the current | |
# directory. Otherwise prints to standard output. | |
# | |
# Once you check this gemspec into your project, releasing a new gem | |
# is dead simple: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
require 'chef/config' | |
require 'chef/search/query' | |
require 'chef/log' | |
require 'time' | |
require 'getoptlong' | |
require "ohai" | |
RET = { |