Apache Basics: A Beginner's Walkthrough for a Basic WordPress Setup

Apache web server can be daunting for a beginner, and the official documentation can be cryptic for someone just getting started. Apache does have getting started documentation, but I found it to be lacking in how to actually set up a real server. In particular, I was concerned about ensuring my first setup for a WordPress site was secure. I found that the best way to understand Apache was to walk through a sample configuration until I knew what each line was for.

Using Raspberry Pi GPIO Without Python

I’ve been wanting to play with the Raspberry Pi’s GPIO (General Purpose Input/Output) pins for a while now and started googling around for how to do it. As expected, lots of beginner tutorials came up, but they all seemed to require Python, specifically the RPi.GPIO library. As great as Python is, I wanted to know how to use the pins without Python. The obvious place to look was the RPi.GPIO library itself.

Slow WiFi in Ubuntu 14.04

I upgraded my internet recently and noticed that my WiFi speed wasn’t anywhere near what it should be. Stranger still, it was the speed I expected when I booted into Windows, but not in Ubuntu, which was a sign that it was a software issue. I googled around and found all sorts of suggestions for how to fix this, such as upgrading the kernel or disabling IPv6. The only solution that worked for me was to change an option in the iwlwifi kernel driver, which is used to interface with Intel wireless chips.

Increasing the Size of an Ubuntu Partition when Dual Booted with Windows 8

About a year and a half ago, I installed Ubuntu on my laptop so I could dual boot with the original Windows 8 installation. At the time, I wasn’t sure if I would stick with Ubuntu, so I was conservative with how much disk space I allocated to the Ubuntu partition. However, I’ve been using Ubuntu as my primary OS since then, and I’d been starting to want more disk space.

Bootstrap's Ugly Button List Group Item Focus State

If you’ve ever used Bootstrap to create a list group of buttons, you might have noticed that Chrome’s blue outline state on focused buttons gets cut off for every button in the list except for the last one. This happens because of the stacking context and the fact that the outline property does not take up space in the layout. Since all of the buttons are at the same level in the stacking context, the later buttons will be rendered higher up.

Rice and Beans

Rice and beans is a classic. This recipe makes a huge amount, which I like to keep around throughout the week. This version is based on the Basic Black Beans and Rice Cooked in Black Bean Broth recipes from Deborah Madison’s The New Vegetarian Cooking for Everyone, but modified to treat them as a single recipe and to use a pressure cooker to speed up cooking the beans. Ingredients 1½ cups black beans, sorted and rinsed 1¼ cups white or brown rice, rinsed well.

Quote by Whitespace in Ruby

Coming from a Perl background, I love Perl’s quote by whitespace syntax: #!/usr/bin/perl use strict; my @words = qw( this is an array of words ); print "$words[3]\n"; # => array So I wondered: Does Ruby have an equivalent of Perl’s qw? It turns out, it does! To “quote by whitespace” in Ruby: array = "ARRAY" words = %w( this is an #{array} of words ) puts words[3] # => #{array} more_words = %W( this is an #{array} of words ) puts more_words[3] # => ARRAY Note that %w creates an array of single-quoted strings, whereas %W creates an array of double-quoted strings, allowing for string interpolation.

Git Hook Pull After Push - remote: fatal: Not a git repository: '.'

I tried to set up a git post-update hook on my Raspberry Pi so when I push changes from my laptop, a task running on the Raspberry Pi would stop, pull the updates, and the start again with the new code. I thought it would be as simple as this: #!/bin/sh # (stuff to do before the pull) cd /path/to/my/project git pull # (stuff to do after the pull) This seemed like it should “just work”, but it gave me this error: remote: fatal: Not a git repository: '.' This felt a bit weird, since the directory most certainly was a git repository; manual pulls worked just fine.

Running Headless Selenium on a Raspberry Pi

I wanted to run Selenium WebDriver headlessly on a Raspberry Pi for a project of mine (not related to automated testing). Here’s what I did: 1. Install Ruby. In my case, the version didn’t matter, so I installed it lazily with sudo apt-get install ruby. Note that the repo’s Ruby is a bit old (1.9.1), so you should use RVM if the version matters. 2.Install Mozilla Iceweasel, Debian’s rebranded version of Mozilla Firefox.

The NTFS Partition is in an unsafe state

On my laptop, I run Ubuntu 13.10 dual boot with Windows 8.1. Since I have a somewhat small SSD and all of my music is stored on the Windows partition, I access it from there through Ubuntu by mounting the partition. Today I booted into Windows for the first time since installing Ubuntu. When I went back to Ubuntu and tried to access the Windows partition, I got this error: The NTFS partition is in an unsafe state.