Skip to content

Instantly share code, notes, and snippets.

@bonyiii
bonyiii / gtk beállítás kde alatt
Created August 26, 2010 09:27
gtk beállítás kde alatt
http://www.gentoo.org/proj/en/desktop/kde/kde4-guide.xml
In order to get configuration options in System Settings->Appearance->GTK Styles and Fonts, you have to install kde-misc/kcm_gtk.
emerge -av kcm_gtk
# a rake18 fájlt nem taláta
cd /usr/bin/
ln -s rake rake18
@bonyiii
bonyiii / list all avilable gem version
Created November 13, 2010 20:06
list all avilable gem version
gem list -d rmagick -ra
@bonyiii
bonyiii / fadeout test with jasmine
Created December 12, 2010 21:16
fadeout test with jasmine
describe("Flash Message", function(){
/**
* Testing fade out with jasmine
* @param {Object} 'flash.html'
*/
it("check flash message fade out", function(){
loadFixtures('flash.html');
waits(2500);
runs(function(){
@bonyiii
bonyiii / gist:755356
Created December 26, 2010 11:10
If ruby rake missing libcrypto.so under opensuse 11.3

Under opensuse 11.3 on an x86_64 machnie in case of: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory

as root do: cd /lib64 ln -s libcrypto.so.1.0.0 libcrypto.so.0.9.8

@bonyiii
bonyiii / gist:762824
Created January 2, 2011 21:19
git create remote tracking branch from local branch
1;
git branch BranchName
git push origin BranchName
git -d BranchName
git branch --track BranchName origin/BranchName
# or
2; Backup all local branches to server
@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:822123
Created February 11, 2011 09:24
PostgreSQL BEFORE INSERT trigger with function
# Function returns user.login, current year, the primary_key which is the id, in 5 length (Example: 00045)
string format
# http://developer.postgresql.org/pgdocs/postgres/functions-formatting.html
# to_char(5,'00000') results the same number format
CREATE OR REPLACE FUNCTION "public"."function_name" () RETURNS trigger AS
'
BEGIN
NEW.title = (SELECT login FROM users WHERE id = NEW.author) || to_char(NOW(),\'YYYY\') || lpad(NEW.id::char, 5, \'0\');
RETURN NEW;
END
@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