Browser Tip: Text Editor

Create a shortcut button on your browser toolbar to create a quick text editor out of a new tab / page. Copy and paste this code into your browser’s address box, then save it to your toolbar:

data:text/html, <title>Change this to whatever you want</title><body contenteditable style=”font-size:2rem;font-family:Helvetica;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;”>

As you can see from the code, you can change just about any aspect of the font, sizing, color, etc. Awesome.

Mounting /tmp as a Separate File System

Managing web hosting servers for years, I have found it pays to continually check and stay ahead of common security issues that arise in the Linux community.  One issue that always crops up, is mounting /tmp as a separate file system; many exploits use the /tmp mount point to execute scripts or attack the file system.  To fix this, we need to mount /tmp as its own file system and set the “noexec” and “nosuid” directives in fstab.

First things first:  we need to secure a backup of fstab

cp /etc/fstab /etc/fstab.bak

Next, we need to create and format a small partition on the system that /tmp will “live” in.  This partition will be the container for its file system. [Read more…]

Flush DNS Cache – Mac OS X

Running and managing complex DNS information for clients, I often come across a time when – like today – I need my machine to resolve to the correct IP as quickly as possible.  On my Mac, this means opening terminal and running a quick one line command.

For Mac OS X Lion or Mountain Lion:  sudo killall -HUP mDNSResponder

For Mac OS X v10.6:  sudo dscacheutil -flushcache

Hope this helps.  It’s not an instant fix (most of the time) but it will greatly speed up the time it takes for your local DNS cache to refresh.