Add on top of default.nix: with import {}; or simply run as nix-build '' (i. e. for nix-build complaining) or rather nix-build -E 'with import {}; callPackage ./default.nix {}' (or even import)
| # kudos to dzaku at consolechars.wordpress.com | |
| ### MOUNT qcow2 image with lvm partitions | |
| # ensure nbd can handle that many partitions | |
| sudo modprobe nbd max_part=8 | |
| # present image as block device through NBD | |
| sudo qemu-nbd --connect=/dev/nbd0 <image.qcow2> |
| # Install arch linux in an encrypted btrfs partition with GPT and UEFI support, gummiboot and hibernate/resume support | |
| # sources: | |
| # http://hole.tuziwo.info/install-arch-linux-on-uefi-gpt-computer-with-btrfs-support.html | |
| # http://www.brunoparmentier.be/blog/how-to-install-arch-linux-on-an-encrypted-btrfs-partition.html | |
| # https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption | |
| # Take note of this: | |
| # - The first thing you need is to identify which disk you're going to use. For the purpose of this guide, it will be /dev/sda | |
| # Be VERY CAREFUL if you have more than one disk on your computer, and DOUBLE CAREFUL if one of them is the one with your backups | |
| # - Since btrfs does not support swapfiles (yet), we'll create a swap partition. In this guide, it will NOT be encrypted |
| ru: | |
| date: | |
| formats: | |
| # Форматы указываются в виде, поддерживаемом strftime. | |
| # По умолчанию используется default. | |
| # Можно добавлять собственные форматы | |
| # | |
| # | |
| # Use the strftime parameters for formats. | |
| # When no format has been given, it uses default. |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |