A collection of links to the excellent"Composing Software" series of medium stories by Eric Elliott.
require 'aws-sdk' | |
class Transfer | |
def initialize(from_bucket, to_bucket) | |
@s3 = AWS::S3.new | |
@from_bucket = @s3.buckets[from_bucket] | |
@to_bucket = @s3.buckets[to_bucket] | |
raise "#{from_bucket} does not exist" unless @from_bucket.exists? |
So you couldn’t wait until the update process had completed and you went for the reset/power button, didn’t you? :smiley: And now you’re getting the message that you don’t have a kernel installed. Well, you’re not the only one — we’re seeing it happen all the time. :wink: | |
So, here’s how to fix it, you impatient n00b. :stuck_out_tongue_winking_eye: | |
If you don’t happen to have a recent Manjaro installer USB/DVD/CD handy, direct your browser to this wonderful page 291, download the .iso of your choice, put it on a USB stick in the proper manner — Ventoy 167 is a great way of creating bootable USB sticks, and it’s available for Microsoft Windows too if that is what you’re currently using — and then boot up from it in live mode. | |
Once the desktop has loaded, open up a terminal window. In this window, issue the following command… :arrow_down: | |
sudo su - | |
From here on, the methodology will differ depending on whether you have ext4 or btrfs. |
Update the system clock | |
Use timedatectl(1) to ensure the system clock is accurate: | |
# timedatectl set-ntp true | |
To check the service status, use timedatectl status. | |
Partitioning | |
bash> fdisk /dev/sda | |
fdisk> g | |
Created a new GPT disklabel (GUID: ABC02D92-4420-4998-A39B-B39257341D68). | |
fdisk> n |
With Rails 3.0 released a few weeks ago I've migrated a few apps and I'm constantly finding useful new improvements. One such improvement is the ability to log anything in the same way that Rails internally logs ActiveRecord and ActionView. By default Rails 3 logs look slightly spiffier than those produced by Rails 2.3: (notice the second line has been cleaned up)
Started GET "/" for 127.0.0.1 at Mon Sep 06 01:07:11 -0400 2010
Processing by HomeController#index as HTML
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` = 3) LIMIT 1
CACHE (0.0ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` = 3) LIMIT 1
Rendered layouts/_nav.html.erb (363.4ms)
# With thanks to https://github.com/optoro/activerecord-callback_notification for original inspiration | |
if Rails.env.development? | |
module ActiveRecord | |
module CallbackNotifications | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def notify_all_callbacks | |
# Make sure all models are loaded before trying to enumerate |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
One of the problems with advancing the discussion on DCI is that we lack a comparable alternative pattern that has the same goals, but favors a low ceremony approach. The closest thing we have to that is Rails concerns, but they are more like distant relatives of the DCI concepts rather than first cousins, and that makes comparisions between the two approaches not especially fruitful.
I am considering the idea of experimenting with my own paradigm that captures the intent and purity of DCI, but with the convenience of concerns. Please note that this is just the starting point of a conversation, it is NOT a promise of comercially available cold fusion or a cure for cancer. It's just a gist with an idea on it I'd like to hear your thoughts on.
What if we had a top-level topology that was split into Models, **Rol
require 'singleton' | |
# outputs a colored call-trace graph to the Rails logger of the lines of ruby code | |
# invoked during a single request. | |
# | |
# Example: | |
# | |
# 1) Make sure this file is loaded in an initializer | |
# | |
# 2) Add the following to your application.rb in Rails3: |
$ rspec --format MacVimFormatter --color spec |