Disabling Upstart Service in Ubuntu (11.04+)
Took me few weeks to find out that this one-liner does wonder: echo manual >> /etc/init/mysql.override (the line above is to disable mysql, obviously. And must be done as root) The answer is on...
View ArticleTags again (now with Rails code)
I’ll put it here for my own reference: def self.slow_has_all_tags(tags) p = Post.scoped pt = PostsTag.arel_table pt_arels = [] tags.each do |t| t_id = Tag.where(:name => t).first[:id] pt_arels...
View ArticleBasic Dovecot/Postfix in Ubuntu
Configuring mail system is annoying. There are quite a bit different components which must be configured to work together. My main choice for mail system is dovecot/postfix. As I don’t really...
View ArticleRails 3.2 in Subdirectory
Steps to be into Rails in subdirectory: Update config.ru to understand the subdirectory mapping: run Moebooru::Application change to map (ENV['RAILS_RELATIVE_URL_ROOT'] || '/') do run...
View ArticleConfiguring SHA rounds for password in RHEL5/6
Due to NIH syndrome and Drepper being Drepper, the only remotely secure password hashing algorithm in RHEL5/6 is multi-rounds SHA512. The default is just salted SHA512 which sucks. Also applies to...
View ArticleRails: read_multi and dalli
Be careful when using read_multi with dalli: it may return nil-valued key instead of the correct key. The issue is tracked here and thanks to this I dropped the read_multi usage in moebooru and used...
View ArticleCompletely Disable UAC in Windows 8
Windows 8, just like Windows 7, has Control Panel interface to disable UAC. There’s difference though: disabling UAC via Control Panel in Windows 8 doesn’t fully disable UAC. You can check it by...
View ArticlePostgreSQL authentication quick start
Connecting to PostgreSQL from command line can be a bit confusing. For starter, just like MySQL, psql command defaults to connecting to socket instead of tcp. To make matter confusing, most PostgreSQL...
View ArticleMail again, Debian 6
For my own reference, after few hours messing around with shit called mail system. Packages: postfix dovecot-imapd (from backports) dovecot-managesieved (from backports) dovecot-sieve (from backports)...
View ArticleFreeBSD pkg (manual) upgrade thingy
For working with locked packages (the ones which must be upgraded through compilation because of using custom options) #!/bin/sh # filename: pkg-lock-outdated pkg query -e '%k = 1' %o | while read...
View Article
More Pages to Explore .....