Working Ninja
2016-11-02T20:35:11

Server
Install NFS server components:

# apt-get install nfs-kernel-server portmap

Add the "root" of all shares (if this is your only share, this should be all you need):

# echo "/home 192.168.1.0/24(ro,fsid=0)" >> /etc/exports

Add additional shares:

# echo "/home/joe 192.168.1.0/24(rw,sync,no_subtree_check)" >> /etc/exports

Update NFS exports table:

# exportfs -avr …

READ MORE

2016-03-26T10:26:48

GitLab was throwing me a 500 server error this morning after an upgrade via yum. To troubleshoot, I ran the self diagnose command from terminal:

# gitlab-rake gitlab:check

Which gave me the following error to fix:

All migrations up? ... no
  Try fixing it:
  sudo -u git -H bundle exec …

READ MORE

2016-03-10T17:26:15
2016-01-21T22:03:11

Unable to boot after kernel (3.19) upgrade on Ubuntu. Here's the fix:

  1. Add copy_modules_dir kernel/ubuntu/i915 to /usr/share/initramfs-tools/hooks/framebuffer.
  2. Then run update-initramfs -k all -u.
  3. Profit.

Fix found here: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1500751

READ MORE

2016-01-19T21:20:09
$ cd ~/bin
$ wget https://services.gradle.org/distributions/gradle-2.10-all.zip
$ unzip gradle-2.10-all.zip
$ ln -s gradle-2.10-all/bin/gradle gradle
$ source ~/.bashrc

READ MORE

2016-01-03T18:09:00

lsusb shows us that—sure enough—Apple's IR receiver is being loaded on boot:

# lsusb
Bus 005 Device 002: ID 05ac:8242 Apple, Inc. Built-in IR Receiver

lsmod reveals hid_appleir is the module being loading for our remote. Let's blacklist it:

# echo 'blacklist hid_appleir' > /etc/modprobe.d/hid_appleir.conf
# depmod -ae
# update-initramfs …

READ MORE

2015-12-30T20:50:04
if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0232323" #black
    echo -en "\e]P82B2B2B" #darkgrey
    echo -en "\e]P1D75F5F" #darkred
    echo -en "\e]P9E33636" #red
    echo -en "\e]P287AF5F" #darkgreen
    echo -en "\e]PA98E34D" #green
    echo -en "\e]P3D7AF87" #brown
    echo -en "\e]PBFFD75F" #yellow
    echo -en "\e]P48787AF" #darkblue
    echo -en "\e]PC7373C9" #blue
    echo -en "\e]P5BD53A5" …

READ MORE

2015-12-20T16:40:09

Open /boot/config.txt and update the following lines:

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=960
framebuffer_height=540

The original values (and the values derived from a high resolution screen) are much larger which results in tiny text on a high resolution …

READ MORE

2015-12-20T14:34:30
# apt-get install unattended-upgrades
# dpkg-reconfigure --priority=low unattended-upgrades

More at https://help.ubuntu.com/community/AutomaticSecurityUpdates

READ MORE

2015-11-26T10:43:23

Streaming over-the-air TV in VLC, I noticed that some channels have heavy interlacing on the video with motion present. To resolve, I enabled deinterlacing with mode "Yadif" ("Yadif (2x)" consumed too much CPU). Yadif consumes about 60-75% CPU cycles.

  1. Tools > Preferences > Video
  2. Set Deinterlacing to "On" …

READ MORE

2015-11-19T08:27:37

I do a lot of code from the command line. Here's how I have Vim tuned for use with Python.

~/.vimrc

syntax on

filetype indent plugin on
set tabstop=8
set expandtab
set shiftwidth=4
set softtabstop=4

READ MORE

2015-11-17T23:19:39
  1. Firmware not loading.
    dmesg | grep -i bluetooth
    
    bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17cb.hcd failed with error -2
  2. Download Windows driver from ASUS.
    http://dlcdnet.asus.com/pub/ASUS/wireless/USB-BT400/UT_USB_BT400_6516000.zip
  3. Extract and open Win32\bcbtums-win7x86-brcm.inf
  4. Find Product Name (BT400).
    %AsusBT400.DeviceDesc%=RAMUSB17CB,          USB\VID_0B05&PID_17CB       ; 20702 standalone
  5. Find section for "RAMUSB17CB".
    ;;;;;;;;;;;;;RAMUSB17CB;;;;;;;;;;;;;;;;;
     
    [RAMUSB17CB.CopyList]
    bcbtums.sys
    BCM20702A1_001.002.014.1315.1347.hex
     
    [RAMUSB17CB.NTX86]
    Include=bth.inf
    Needs=BthUsb.NT
    FeatureScore=F0 …

READ MORE

2014-11-15T17:57:57

This post is an explanation of the Zero-configuration Web Application Debugging with Xdebug and PhpStorm wiki entry over at JetBrains.

While the instructions are pretty straight forward, I wanted to share where being a beginner had me scratching my head wondering why things weren’t working. Enjoy!

1. Install Xdebug
I …

READ MORE

2014-04-05T17:40:11

Here’s the lowdown on how I setup my MAMP (Mac, Apache, MySQL and PHP) server for local web development and the steps I went through to create a development environment for a site already in production.

Configuring Apache

Apache comes preinstalled with OS X so I decided to stick with …

READ MORE