Skip to content

Instantly share code, notes, and snippets.

View Tombar's full-sized avatar

Martin Loy Tombar

View GitHub Profile
@Tombar
Tombar / rvm --trace get head
Created June 17, 2012 03:06
rvm --trace get head
tombar@Erebor ~/D/W/Gruwlss> rvm --trace get head
+ [[ -n '' ]]
+ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 799 > [[ -z '' ]]
+ /scripts/cli : __rvm_parse_args() 799 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 801 > [[ 0 -eq 1 ]]
+ /scripts/cli : __rvm_parse_args() 801 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 26 > [[ -n get ]]
+ /scripts/cli : __rvm_parse_args() 28 > rvm_token=get
tombar@Erebor ~/D/W/Gruwlss> rvm get
fish: Illegal command name 'get_usage()'
/private/var/folders/40/19ww5r3168xbdf8251qrjdwc0000gn/T/16178 (line 5): get_usage()
^
fish: Illegal command name '{'
/private/var/folders/40/19ww5r3168xbdf8251qrjdwc0000gn/T/16178 (line 6): {
^
fish: Illegal command name '}'
/private/var/folders/40/19ww5r3168xbdf8251qrjdwc0000gn/T/16178 (line 8): }
^
@Tombar
Tombar / gist:3484913
Created August 27, 2012 01:34
Puppet GIT alternativas
# forma bruta para sobrevivir a lo que sea
# BruteForceGIT
file {
"${repo_root}" :
ensure => 'directory',
mode => 0755,
owner => 'user',
group => 'group',
}
@Tombar
Tombar / gist:5627807
Created May 22, 2013 14:10
Logstash lumberjack input filter example
input {
lumberjack {
# The port to listen on
port => 1234
# The paths to your ssl cert and key
ssl_certificate => "/path/to/server.crt"
ssl_key => "/path/to/server.key"
# Set this to whatever you want.
augeas { '/etc/php5/fpm/php-fpm.conf custom_log_settings':
lens => 'Php.aug',
incl => '/etc/php5/fpm/php-fpm.conf',
context => '/files/etc/php5/fpm/php-fpm.conf',
changes => [
'set global/error_log "/var/log/php/php5-fpm.log" ',
'set global/log_level debug',
],
require => Package['libaugeas-ruby']
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamicaly changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
augeas { '/etc/php5/fpm/php-fpm.conf custom_log_settings':
lens => 'Php.aug',
incl => '/etc/php5/fpm/php-fpm.conf',
context => '/files/etc/php5/fpm/php-fpm.conf',
changes => [
'set global/error_log "/var/log/php/php5-fpm.log" ',
'set global/log_level debug',
],
require => Package['libaugeas-ruby']
}
# on the db
mysql> select id, display_name, email, lower(concat(replace(display_name, ' ', ''), id)) as clave_nueva from UserData_userprofile;
| 189 | Moe | | moe189 |
| 190 | Larry | | larry190 |
| 191 | Curly | | curly191 |
# on the admin
# Postfix stuff
QUEUEID (?:[A-F0-9]+|NOQUEUE)
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote}
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::[0-9]+(.[0-9]+)?)?)?)
#RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?:%{POSREAL:relayport})))
POSREAL [0-9]+(.[0-9]+)?
#DELAYS %{POSREAL:a}/%{POSREAL:b}/%{POSREAL:c}/%{POSREAL:d}
DELAYS (%{POSREAL}[/]*)+
DSN %{NONNEGINT}.%{NONNEGINT}.%{NONNEGINT}
grok {
tags => "postfix/smtpd"
pattern => [ "%{POSTFIXSMTPDCONNECTS}",
"%{POSTFIXSMTPDACTIONS}",
"%{POSTFIXSMTPDTIMEOUTS}",
"%{POSTFIXSMTPDLOGIN}",
"." ]
named_captures_only => true
}