Guide to Ubuntu 11.10 on a Samsung Netbook
12.04 UPDATE: Unsurprisingly, after installing 12.04 which includes the 3.2.x kernel, brightness controls work perfectly out of the box. Sadly, it’s still necessary to tweak modprobe to get wireless working after a suspend/resume. Also, don’t forget to reboot after making the changes!
After reading a few too many reviews about netbook hardware and its compatibility with Linux, I settled on a Samsung NF310 netbook. However, like all things worth doing, it wasn’t nearly as easy as I’d hoped. This post highlights some of the lessons learned from my first days with Linux on my Samsung netbook.
Pre-Installation
I had been eagerly awaiting the arrival of my new hardware and had already gotten a fresh copy of Fedora 16 ready. The crippled Windows 7 Starter Edition was going to be off that netbook as a first order of business, as a matter of principle. If I had it to do over again, I would have installed the Windows-only BIOS update for the Netbook first. I’m working through using BartPE, but the installation onto the USB drive hasn’t gone well. Best to do these kinds of Windows-only activities while Windows is still easily available.
Additionally, I would have used YUMI multiboot USB …
linux tips hardware
Custom Apache log to only show HTML requests
Today while working on an AJAX issue for CollegeDistrict.com I came across a need to only see HTML requests to Apache while leaving out all of the many requests for images, CSS, and JavaScript files. This would make it quite easy to see when AJAX requests were making it through properly.
I found a solution which worked well and used these settings in our development httpd.conf:
SetEnvIf Request_URI "(\.html|\.shtml)$" html
CustomLog logs/html.log common env=htmlapache sysadmin
MWRC Highlights Part 2 of 2
This is Part 2 of my 2012 Mountain West Ruby Conference Highlights article I posted the week of the conference. To date, I still have a ton of TODO reading from the conference. Here are some of the things mentioned during Day 2 of the conference that are on that list.
Rollout: a gem that enables/disables sets of features for certain conditions, users, etc.
- Rollout is a very slick way to activate or deactivate features within your web app programmatically. Perhaps you want to deploy a new feature in production, but only for internal IP addresses, or certain @users, or a percentage of your @users. Perhaps you do and that feature blows up in production, but it’s no big deal because with Rollout it only takes one line of code to turn that feature off for everyone. Perhaps it doesn’t “blow up” as much as “melt down” and you’d like your app to turn off that feature automagically before you get an angry call from your CTO? Check out the Degrade gem for that, Rollout’s awesome superhero sidekick.
- By James Golick
- Get it: https://github.com/jamesgolick/rollout
- Mentioned by: Matt White in his “Continuous Deployment” talk
Vagrant: an open source tool that manages virtual machines and their …
conference ruby rails
Stateful IPv6 tracking in RHEL 5: Fail
Are you a RHEL 5 user? Or CentOS or Scientific Linux, for that matter? Have you started deploying IPv6 on RHEL 5? If you’re using ip6tables as a firewall in this environment, you may want to double check its configuration.
The short version: The 2.6.18 kernel RHEL 5 ships doesn’t have a working conntrack module for IPv6. The conntrack module is what ip6tables uses for stateful packet tracking. You may already be familiar with it from the IPv4 version of iptables, looking something like this in your firewall config:
-m state --state ESTABLISHED,RELATED -j ACCEPTip6tables will accept that as well, it just doesn’t do much. The rule is effectively skipped, and the processing eventually gets down to where ip6tables is set to drop or reject, unless it matches something else along the way. Thus it appears that outgoing connections are blocked for most servers, but maybe not everywhere, even if you don’t have any rules in your OUTPUT chain.
Incoming connections will of course work fine, as those don’t rely on the state match (at least initially) and instead match explicitly defined rules for public ports, specific source addresses, etc. RHEL 6 is also fine, as the more recent kernel has …
ipv6 redhat
Web Development for HeARTs Speak
Many of my colleagues know that I’m fairly involved in animal rescue as a photographer and more recently as a foster. I recently became involved in HeARTs Speak, a non-profit, volunteer-driven organization that brings together artists (photographers and more) who volunteer at animal rescue organizations. |
|
|
|
|
I worked with them to help launch a new website with a design from Enso Blue, which brings us to the point of the article. Given a choice of many platforms and tools, what tools did I use in development of a new site with the only restriction being how much time I was able to put into development and maintenance? Here’s a quick rundown the tools I used for the new website. |
|
Ruby on Rails: Here at End Point, we develop many applications in Ruby and Ruby on Rails. It’s a platform that encourages decent code organization and efficient development. Another option that came up was PHP with WordPress. However, since the website required a custom application and voting process for joining members, I concluded that WordPress would be a bit of a hassle with this level of customization (though I’m personally a big fan of WordPress and its community). … |
performance rails tips tools
Three Things: frame box, Kiss Metrics, DUMP_VHOSTS
Here’s my latest installment of sharing content that doesn’t necessarily merit entire blog posts, but I still want to write it down somewhere so I’ll remember!
1. Kiss Metrics on Design and Conversion
First up is an article sent over by Jon. This is a great article from The Kiss Metrics Blog. Several of us at End Point have been a part of redesigning the End Point website and this is an interesting article that discusses how design decisions affect conversion, and how it’s important to justify design decisions with metrics and testing.
2. Apache DUMP_VHOSTS
Next up is a quick system admin command line that I came across while troubleshooting something with Richard:
apache2ctl -t -D DUMP_VHOSTSWe have a team of hosting experts here at End Point, and I am not often involved in that aspect of the web application deployment. But I was recently trying to figure out why the default Apache site was being served when a recent domain had been updated to point to my IP address. I worked with Richard on a screen session and he pointed out how the above command was helpful in examining how all the virtual hosts are handled by Apache. We identified that the default host was being served for …
tips
CanCan and RailsAdmin in Ecommerce
I’ve written about Rails Admin a lot lately. One thing I haven’t written about is how it can leverage CanCan for user authorization. Once a user is authenticated via Devise, CanCan adds an additional layer for you to control how users can access and interact with data from the admin.
A Simple Example
CanCan requires that you create an Ability class where all user permissions are defined. A very basic example in RailsAdmin ecommerce context might look like this:
class Ability
include CanCan::Ability
if user && user.is_admin?
can :access, :rails_admin
can :dashboard
can :manage, [User,
Product,
Order]
end
endNote that in the above code, a user that is admin (where is_admin? returns a truthy reponse) has access to RailsAdmin, and the admin user can manage (create, read, update, destroy) all users, products, and orders.
Multi-Merchant Solution
Let’s go a little deeper. Multi-merchant solutions are a frequent request in ecommerce. Let’s say we have the following over-simplified data model, where users own and manage products and products are displayed by category:
The Ability class might look like:
class Ability
include …ecommerce rails
Debugging Celery Tasks in Django Projects
I recently had the opportunity to work on a Django project that was using Celery with RabbitMQ to handle long-running server-side processing tasks. Some of the tasks took several hours to complete. The tasks had originally been executed with the at command and others had been managed with cron jobs. The client had started to migrate several of the tasks to use Celery when I joined the project.
As I started to debug the Celery tasks, I quickly discovered there were many moving parts involved and it was not immediately clear which piece of the system was the cause of the problem. I was working in a local development environment that closely matched the production system. The dev environment consisted of a virtualenv created using the same method Szymon Guz wrote about in his article Django and virtualenvwrapper. Django, Celery and their related dependencies were installed with pip and I installed RabbitMQ with Homebrew. After activating my virtualenv and starting up everything up (or so I thought), I jumped in to an IPython shell and began to debug the tasks interactively. Some tasks completed successfully but they finished almost instantaneously which didn’t seem right. The client …
django

