Skip to content

Instantly share code, notes, and snippets.

@bonyiii
bonyiii / gist:766042
Created January 5, 2011 07:56
vtiger mysql crash
InnoDB: Unable to lock ./vtigercrm521/vtiger_users2group.ibd, error: 37
110105 8:58:52InnoDB: Assertion failure in thread 2890320752 in file fil/fil0fil.c line 630
InnoDB: Failing assertion: ret
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
@bonyiii
bonyiii / gist:837029
Created February 21, 2011 12:57
rails gettext ascii-8bit encoding error

If you use a not english msgid in a rails ERB template, for example: _('Jelszó megerősítés'). And then you run rake gettext:find

it will likely raise an error like this:

rake aborted!
"\xC3" from ASCII-8BIT to UTF-8
~/.rvm/gems/ruby-1.9.2-p0@rails3/gems/gettext-2.1.0/lib/gettext/tools/rgettext.rb:198:in `write'
@bonyiii
bonyiii / gist:867522
Created March 12, 2011 20:19
dns és dns test
$TTL 2d
@ IN SOA linux.site. root.linux.site. (
2006042502 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum
IN NS linux.site. ; örökli a kukacot a soatól (minid előző sorból örökölnek)
IN MX 0 mail.linux.site. ; szám azt jelenit, hogy hanyadik hanyadik a levelező szerverek sorában
@bonyiii
bonyiii / gist:872495
Created March 16, 2011 13:34
download railscasts
wget -q -O - http://feeds.feedburner.com/railscasts | awk -F \” ‘/media:content/ {print $4}’ | head -n 2 | wget -i - -c
credit: http://niczsoft.com/2010/01/download-all-railscasts/
@bonyiii
bonyiii / gist:890073
Created March 28, 2011 06:26
Nagios setup

/etc/portage/package.use fájl tartalma media-libs/gd jpeg png net-analyzer/nagios-core apache2 vim-syntax net-analyzer/nagios-plugins mysql postgres ldap nagios-ssh nagios-ping nagios-dns net-analyzer/nagios-nrpe -ssl net-analyzer/nagios-plugins -ssl dev-lang/php apache2 xml gd

Telepítés: emerge -gkav nagios apache nagios-nrpe

@bonyiii
bonyiii / gist:926930
Created April 19, 2011 06:54
corosync pacemaker in openvz

According this [thread][pacemaker mail archive] setting up [/dev/shm][/dev/shm] solves these kind of problems:

Apr 19 06:18:27 mongo2.example.com crmd: [1938]: info: crm_timer_popped: Wait Timer (I_NULL) just popped!
Apr 19 06:18:28 mongo2.example.com crmd: [1938]: info: do_cib_control: Could not connect to the CIB service: connection failed
Apr 19 06:18:28 mongo2.example.com crmd: [1938]: WARN: do_cib_control: Couldn't complete CIB registration 29 times... pause and retry
Apr 19 06:18:30 mongo2.example.com crmd: [1938]: info: crm_timer_popped: Wait Timer (I_NULL) just popped!
Apr 19 06:18:31 mongo2.example.com crmd: [1938]: info: do_cib_control: Could not connect to the CIB service: connection failed
Apr 19 06:18:31 mongo2.example.com crmd: [1938]: WARN: do_cib_control: Couldn't complete CIB registration 30 times... pause and retry
Apr 19 06:18:31 mongo2.example.com crmd: [1938]: ERROR: do_cib_control: Could not complete CIB registration  30 times... hard error
Apr 19 06:18:31 mongo2.example.com 
@bonyiii
bonyiii / gist:951412
Created May 2, 2011 10:22
Trac with Apache WSGI

WSGI install under opensuse 11.1

http://rpm.pbone.net/index.php3/stat/4/idpl/11536618/dir/opensuse/com/apache2-mod_wsgi-2.3-1.5.x86_64.rpm.html

If receiving this error:

 TimeoutError: Unable to get database connection within 0 seconds. (TracError(<babel.support.LazyProxy object at 0x7f75bbba7b90>,))

Make sure the user running the web server has read access to trac.ini.

@bonyiii
bonyiii / gist:953031
Created May 3, 2011 08:52
show all foreign key in a database
@bonyiii
bonyiii / gist:954781
Created May 4, 2011 05:03
speed up ssh connection with X forward
@bonyiii
bonyiii / gist:964082
Created May 10, 2011 08:09
message over ssh
http://ranjith.zfs.in/send-messages-over-network-gnome-popup-box-message/
http://unix.stackexchange.com/questions/9153/xmessage-over-ssh
http://en.andregondim.eti.br/?p=72
xmessage "Hello World!" -display :0 &
Start desktop application over ssh on a remote machine
# DISPLAY=:0; XAUTHORITY=~owner_of:0/.Xauthority; export DISPLAY XAUTHORITY