Skip to content

Instantly share code, notes, and snippets.

@zined
zined / gist:7155543
Created October 25, 2013 14:28
puppet / hiera env
# dpkg -l | grep puppet
ii hiera 1.2.1-1puppetlabs1 A simple pluggable Hierarchical Database.
ii hiera-puppet 1.0.0-1puppetlabs1 A simple pluggable Hierarchical Database.
ii puppet 2.7.19-1puppetlabs2.1 Centralized configuration management - agent startup and compatibility scripts
ii puppet-common 2.7.19-1puppetlabs2.1 Centralized configuration management
ii puppetdb-terminus 0.9.0-1puppetlabs1 Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
ii puppetmaster-common 2.7.19-1puppetlabs2.1 Puppet master common scripts
ii puppetmaster-passenger 2.7.19-1puppetlabs2.1 Centralised configuration management - master setup to run under mod passenger
@zined
zined / gist:6807740
Created October 3, 2013 10:03
#statParty
[zined@wurstbrot testing]$ mkdir -p 0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16
[zined@wurstbrot testing]$ touch 0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/foo
[zined@wurstbrot testing]$ strace php -r 'file_exists("./0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/foo");' 2>&1 | grep lstat
lstat("/home/zined/go/bin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/home/zined/go/bin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/usr/local/sbin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/usr/local/bin/php", 0x7fff987cc6c0) = -1 ENOENT (No such file or directory)
lstat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8419512, ...}) = 0
@zined
zined / gist:6616881
Last active December 23, 2015 09:49
from hetzner to hetzner... they seem to have a pretty large... solid... complex... AAAAALL THE INTERWEBZ!
fatbaby.de (0.0.0.0) Thu Sep 19 00:53:47 2013
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. static.65.54.9.176.clients.your-server.de 0.0% 697 0.7 1.4 0.5 7.0 0.9
2. hos-bb3.juniper1.rz15.hetzner.de 0.0% 697 0.2 2.3 0.1 163.6 10.0
3. core21.hetzner.de 0.0% 697 0.3 0.3 0.2 12.1 0.7
4. juniper1.rz13.hetzner.de 80.2% 697 0.3 2.1 0.2 49.0 7.4
5. hos-tr2.ex3k4.rz13.hetzner.de 80.3% 697 0.8 1.8 0.7 4.5 0.9
6. ???
@zined
zined / gist:5881186
Created June 27, 2013 23:06
hekad.toml
##### INPUT
[var_log_kern_log]
type = "LogfileInput"
logfile = "/var/log/kern.log"
seekjournal = "./var/run/hekad/seekjournals"
##### DECODER
[var_log_kern_log_decoder]
type = "LoglineDecoder"
matchRegex = '/^(?P<Timestamp>\w+ \d+ \d+\:\d+\:\d+) (?P<Hostname>[^\ ]+) (?P<Event>[^\ ]+) (?P<Message>.*)$/'
[some_logfile]
type = "LogfileInput"
logfiles = [ "/tmp/some_logfile" ]
[some_logfile_counter_filter]
type = "CounterFilter"
message_matcher = "Type == 'logfile' && Logger == '/tmp/some_logfile'"
[counter_output]
type = "LogOutput"
@zined
zined / gist:5130435
Created March 10, 2013 21:11
cfengine3 user "management"
#
# adds users to the system
#
bundle agent add_users
{
vars:
"pw[user1]"
string => "user1:x:10001:100:User1Name:/home/user1:/bin/sh";
"shadow[user1]"
cf3> CFEngine - autonomous configuration engine - commence self-diagnostic prelude
cf3> ------------------------------------------------------------------------
cf3> Work directory is /var/cfengine
cf3> Looking for a source of entropy in /var/cfengine/randseed
cf3> Making sure that locks are private...
cf3> Checking integrity of the state database
cf3> Checking integrity of the module directory
cf3> Checking integrity of the PKI directory
cf3> -> Loaded private key /var/cfengine/ppkeys/localhost.priv
cf3> -> Loaded public key /var/cfengine/ppkeys/localhost.pub
body common control
{
bundlesequence => {
"foo",
};
inputs => {
"libraries/cfengine_stdlib.cf",
};
}
@zined
zined / part_of_syslog
Created December 21, 2012 15:45
resource leak fixed in commit "a4a4442277702fb0b4b05ea3197bfe2b9814752a"
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child 19532 higher than MAX_FD in cf_popen, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child higher than MAX_FD in cf_pclose, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child 19533 higher than MAX_FD in cf_popen, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child higher than MAX_FD in cf_pclose, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child 19535 higher than MAX_FD in cf_popen, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child higher than MAX_FD in cf_pclose, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child 19537 higher than MAX_FD in cf_popen, check for defunct children
Dec 21 15:41:10 ip-10-48-18-8 cf3[19531]: File descriptor 137 of child higher t
@zined
zined / percona-server-server-5.5.postinst.patch
Created December 20, 2012 18:33
debian squeeze percona-server-server-5.5.postinst.patch
--- percona-server-5.5-5.5.28-rel29.2/debian/percona-server-server-5.5.postinst 2012-12-07 20:06:23.000000000 +0000
+++ patched_percona-server-server-5.5.postinst 2012-12-20 18:31:03.731742992 +0000
@@ -206,13 +206,13 @@
" Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`;
fix_privs=`/bin/echo -e \
"USE mysql;\n" \
- "ALTER TABLE user ADD column Create_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
- "ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
- "ALTER TABLE user ADD column Create_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
- "ALTER TABLE user ADD column Alter_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \