Quantcast
Channel: Blog.myconan » tipsntrick
Browsing latest articles
Browse All 21 View Live

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 Article



Tags 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 Article

Basic 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 Article

Rails 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 Article

Configuring 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 Article


Rails: 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 Article

Completely 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 Article

PostgreSQL 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 Article


Mail 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 Article


FreeBSD 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
Browsing latest articles
Browse All 21 View Live




Latest Images