Rebroadcast Wi-Fi (Windows 7/Windows 8)

Internet Connection Sharing (ICS) in Windows can be used to easily configure a simple NAT that bridges the wired and wireless connections of a laptop, for example. However, it is also possible to have the wireless adapter perform double-duty as both a wireless access point and a bridge to an existing internet-connected network, allowing other wireless devices to access the Internet through the bridge. This is most useful when traveling with multiple devices in hotels or airports that tie paid Wi-Fi service to a single MAC address, limiting access to one device.

<code></code> tags look bad in Drupal

When adding machine output to a post in Drupal or Wordpress, it is generally encouraged to wrap the text in <code></code> tags. This looks bad, especially for output with multiple lines.

This is the first line of code
This is the second line of code

This is a multi-line block of code
contained within one tag

The quickest solution is to use the <pre></pre> tags which look much better. They are not included by default in the FilteredHTML tag set in Drupal, so to use them, be sure to change the "Text format" drop-down to Full HTML

This is the first line of code
This is the second line of code
This is a multi-line block of code
contained within one tag

Force apt-get to reinstall config files

Sometimes when using apt-get remove or aptitude remove, configuration files in /etc/ are left behind. If you delete them, and then reinstall the package, the files may not be recreated.

To get around this, purge the package after removal, but before attempting to reinstall it

dpkg --purge package

Alternatively, apt-get can be instructed to reinstall just the configuration files:

apt-get -o DPkg::options::=--force-confmiss --reinstall install package


Mysql Notes


# service mysql stop
# mysqld_safe --skip-grant-tables
# mysql -u root
  mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
  mysql> quit
# mysqladmin shutdown
# service mysql start


# mysqldump -u root -p --events --all-databases > backup_`date +%Y-%m-%d`.sql

Samba Authentication with Windows 8 Online Account

With the release of Windows 8, Microsoft has enabled the use of Microsoft Live online accounts to access the desktop. This enables certain OS settings to be stored in the cloud for easy retrieval, but it also makes it difficult for a Samba server to map the email-formatted Windows account to a Unix or LDAP account when using security = user.

The steps to resolve this are as follows:

1. Create a user in the back end. By default, this means creating a Unix account, then adding the user to smbpasswd:

Solaris 11 gcc error: cannot run C compiled programs

With a fresh installation of Solaris 11, using gcc 4.5.X that it comes with sometimes results in an error during configuration:

# cd /usr/src/rsync/rsync-3.1.0
# ./configure
[output omitted]
checking whether we are cross compiling... error: in `/usr/src/rsync/rsync-3.1.0': error: cannot run C compiled programs.
If you meant to cross compile, use `--host'. 
See `config.log' for more details

This can be resolved by installing the system/header package and possibly autoconf

# pkg install system/header autoconf

You may also need to specify the GCC linker when configuring

# ./configure LD=gcc

Sony Vegas MOV files go dark over time

I love Sony Vegas for video editing and I ran into a bizarre issue recently that took me days to resolve.

While editing with MOV files generated by a Nikon V1, Codec: H264 - MPEG-4 AVC (part 10) (avc1), my preview window suddenly went black. The trimmer went dark. Renders of the clips were black. Other clips in other codecs on the same timeline were fine. No initial problems with the audio (see below)

Boot diskless XBMC-Live HTPC (w/ ION) via Solaris iSCSI server

For XBMC-Live 9/10


cd /tmp
gunzip -dc syslinux-4.03.tar.gz | tar xf -
mkdir -p /tftpboot/iscsi /tftpboot/pxelinux.cfg
cp /tmp/syslinux-4.03/core/pxelinux.0 /tftpboot
cp /tmp/syslinux-4.03/com32/menu/menu.c32 /tftpboot
vi /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 30 


KERNEL iscsi/vmlinuz
APPEND initrd=iscsi/initrd.img root=/dev/sda1 ro ip=:::::: iscsi_initiator= iscsi_target_name= iscsi_target_ip= iscsi_target_port= iscsi_target_group= acpi_enforce_resources=lax usbcore.autosuspend=-1 xbmc=autostart,nodiskmount loglevel=0 video=vesafb

Glassfish V3 redirect HTTP to HTTPS

If you have secure administration enabled on your glassfish server, it can be tricky to enable http to https redirection for your applications as well. The solution I found was to store the port unification directives under an alternate pu-protocol from the one set up by asadmin enable-secure-admin, called pu-protocol-2:


Solaris Zones + ZFS Datasets: Limitations of Zoned

Solaris ZFS datasets can be delegated to individual zones using the “add dataset” zone configuration directive. See this blog for a good writeup.

It is important to note, however, that when using zone with ZFS roots, additional zoned datasets should reside outside the zone’s root dataset itself. Otherwise, lucreate throws an error about being unable to determine the mountpoint of the child dataset created in the clone map during the Live Upgrade process.


Subscribe to RSS