Skip to content

Instantly share code, notes, and snippets.

View frimik's full-sized avatar

Mikael Fridh frimik

  • Electronic Arts / DICE
  • Uppsala, Sweden
View GitHub Profile
@jordansissel
jordansissel / README.md
Created February 19, 2012 06:30
Reading RPMs

Something in RPM changed between RHEL5 and RHEL6.

I can read RPMs for CentOS5 and earlier, but in EL6, the signature header is longer than expected by exactly 4 bytes. I have also observed some normal header (non signature) sections being longer than expected by 16 bytes. It is quite confusing.

If you have insight, please let me know here.

@vStone
vStone / params.pp
Created January 19, 2012 15:25
Example / Trial use case for 'dynamic' module incorp.
# === Actions:
#
# === Requires:
#
# === Sample Usage:
#
class passenger::params (
$packages = undef,
$configpath = undef,
$version = undef,
@crazed
crazed / ip.rb
Created December 2, 2011 21:42
useful facter plugins
if File::exists?("/sbin/ip")
Facter.add('gateway') do
setcode do
`/sbin/ip route show`.match(/^default.*/)[0].match(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/)[0]
end
end
end
@fxtentacle
fxtentacle / agent.conf
Created October 31, 2011 20:44
Hajo's logstash config
input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"
@amyreese
amyreese / znc-query-buffering.patch
Created September 9, 2011 14:02
Query Buffering Patch for ZNC
This patch make ZNC query buffering behave the way I like, as I use
multiple clients and still want the query buffer to be filled and replayed
for the newly connecting client.
diff -rup znc-0.074/IRCSock.cpp znc/IRCSock.cpp
--- znc-0.074/IRCSock.cpp 2009-06-29 13:26:19 +0200
+++ znc/IRCSock.cpp 2009-08-26 11:30:56 +0200
@@ -724,21 +724,14 @@ bool CIRCSock::OnGeneralCTCP(CNick& Nick
bool CIRCSock::OnPrivNotice(CNick& Nick, CString& sMessage) {
MODULECALL(OnPrivNotice(Nick, sMessage), m_pUser, NULL, return true);
@bowsersenior
bowsersenior / stooge_loader.rb
Created May 18, 2011 23:18
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {