VIVAHATE

3ds Max

Teaching myself 3ds Max. Here’s what I’ve come up with so far:

Installing PostgreSQL 8.4 in Ubuntu 10.04

More Indian

Even more Indian food.

Salmon, Cauliflower, and Brussels

Kale, Ground Turkey, and Wild Rice

Daal Makkhani

X Window Manager Part 1 – Hello XCB

Minimal X Install

Debian net install. Base system only.

# aptitude install xorg
$ startx

Hello XCB

# aptitude install build-essential libx11-dev libxcb1-dev

Debian 6 Install Log Redux

System Install

[Configure Wifi]

# aptitude update
# aptitude install debian-multimedia-keyring
# aptitude update
# aptitude install sudo
# visudo
# aptitude install xorg openbox obconf menu

Add the following to ~/.xinitrc

exec openbox-session
$ startx

Appearance

# aptitude install gtk-theme-switch gtk2-engines

Use the gtk-theme-switch2 application to switch the GTK+ theme.

cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml

Pizza

The Kitchen Aid makes pizza crust a snap.

Arch Linux – Macbook Pro

Install Arch

Basic Arch install without networking using the core CD image. Make sure to add wireless_tools from base-devel.

Configure Wifi

I had to blacklist the bcma module. YMMV. There’s some good info here: https://wiki.archlinux.org/index.php/Broadcom_wireless

The network uses WPA encryption

Verify that the kernel module has been loaded and the hardware is ready to use:

$ iwconfig

Bring the interface up:

$ ip link set wlan0 up

List available networks:

$ iwlist wlan0 scan

Rename the default wpa_supplicant.conf:

$ mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original

Generate a new wpa_supplicant.conf:

$ wpa_passphrase "ESSID" "SECRET PASSKEY" > /etc/wpa_supplicant.conf

Associate adapter with access point:

$ wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf

Get an IP address via DHCP:

$ dhcpcd wlan0

Test:

$ ping -c 3 www.google.com

Add the following to /etc/rc.local:

$ ip link set wlan0 up
$ wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
$ dhcpcd wlan0

Reboot and you should be connected to the wireless network.

Configure Pacman and Update the System

Edit /etc/pacman.d/mirrorlist and choose a mirror:

$ nano /etc/pacman.d/mirrorlist

Update the system:

$ pacman -Syu

Add a User

# useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power,scanner -s /bin/bash kyle
# passwd kyle

Sudo

# pacman -S sudo

Add your user to the sudoers list

# visudo

Add the following to the end of the file

kyle ALL=(ALL) ALL

ALSA

# pacman -S alsa-utils

Use alsamixer to unmute the channels

Packer

Install packer

sudo pacman -S git
cd ~/
mkdir src
cd src
git clone https://github.com/bruenig/packer.git
cd packer
chmod 755 packer
sudo ln -s /home/kyle/src/packer/packer /usr/bin/packer

X and Openbox

# pacman -S xorg-server xorg-apps xorg-xinit xterm openbox

Add exec openbox-session to ~/.xinitrc

Nvidia Driver

# pacman -S nvidia nvidia-utils

Reboot.

# nvidia-xconfig

Trackpad Driver

# packer -S xf86-input-mtrack-git

Add the following to your /etc/X11/xorg.conf

Section "InputClass"
  MatchIsTouchpad "on"
  Identifier "Touchpads"
  Driver "mtrack"
  Option "IgnoreThumb" "true"
  Option "IgnorePalm" "true"
  Option "Sensitivity" "0.7"
  Option "ButtonIntegrated" "false"
EndSection

More options here: https://github.com/BlueDragonX/xf86-input-mtrack

Freetype Configuration

TODO

Chromium and Flash

# pacman -S chromium flashplugin

Rails Development

Install RVM:

$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Close your terminal and open a new one.

Dropbox

Install Dropbox:

# pacman -S dropbox
$ dropbox start

Log in to Dropbox.

PostgreSQL

# pacman -S postgresql
$ createuser -s -U postgres
  Enter name of role to add: kyle
$ createdb

Jacques’ Seafood Bread

A recipe from Jacques Pépin.

Happy cooking!

Duck w/ Candied Kumquat

Photo by Jameel

Grilled Chicken w/ Mango Salsa

Photo by Jameel

Dumplings

Photo by Jameel

Login Redirection with Rails 3.1, Devise, and CanCan

This approach satisfies a few common requirements:

  • Requests by non-signed in users should redirect to the sign in page. Post sign in, the user should be redirected to their original destination.
  • Requests by signed in users to resources which they cannot access (CanCan::AccessDenied) should redirect to an error page.

Modify Application Controller

First, update your application controller.

Create Error View

Create app/views/error/403.html.erb. The contents of the file are unimportant.

Create Session Controller

Generate a new session controller:

rails g controller Sessions

Here’s how it should look:

Update Routes

Update your routes so Devise knows to make use of your new sessions controller.

Move New Session View

Move your new session view (if you generated them) from /app/views/devise/session/new.html.erb to /app/views/session/new.html.erb.

HINT: Set config.consider_all_requests_local in /config/environments/development.rb to false to test this while in development.

Wall of Food

Hey, look! It’s the wall of food. Crappy iPhone pictures. Most of these are quick work-night meals or weekend breakfasts. August through October, 2011.

Rails REST Testing with cURL

Charlottesville, VA

Photo by Jameel

Carnitas

Kegs

« Older Entries