.bash_profile vs .bashrc or why does OS X ignore my .bashrc in Terminal.app?
Month: August 2012
-
Keyboard shortcut to un-minimise a window in OS X
It’s a bit fiddly but it can be done.
Cmd+m to the item you want to un-minimise, then while still holding cmd, press Option. Release Cmd and then finally release Option. -
Cmd+m to Minimise a window in OS X
Cmd+m to minimise a window in OS X
-
Insert a new heading after numbered list in org-mode
In org-mode in emacs,
M-<RET>
will add either a new heading or if your insertion point is between a list item and a heading, it will add a new list item. This is not always desirable. To add a new heading tryC-U M-<RET>
.
I only discovered this as I got frustrated with org-mode insisting on adding an item to the list rather than creating a new heading. The emacs way around problems like this is to prefix the command withC-U
to make it do something slightly different. -
Collaborative online $\LaTeX$ documents
writelatex.com is awesome. Edit your $LaTeX$ document and see the changes almost immediately.
-
Collaborative online $\LaTeX$ documents
writelatex.com is awesome. Edit your $LaTeX$ document and see the changes almost immediately.
-
Collaborative online $\LaTeX$ documents
writelatex.com is awesome. Edit your $LaTeX$ document and see the changes almost immediately.
-
Collectd causing rrd illegal attempt to update using time errors
I found collectd causing rrd illegal attempt to update using time errors. I was seeing a whole load of lines like this in my syslog:
Aug 20 16:27:12 mythbox collectd[32167]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/mythbox/df-root/df_complex-free.rrd) failed: /var/lib/collectd/rrd/mythbox/df-root/df_complex-free.rrd: illegal attempt to update using time 1345444032 when last update time is 1345444032 (minimum one second step)
It was adding one message like that every second so my logs were completely full of it. Google didn’t reveal much except that this sort of error is either because there are two instances of RRD trying to write the RRD database at the same time, or that my server’s date and time are way out of sync. Neither of these were true in my case.
I asked on #collectd on freenode and a very nice person by the name of tokkee told me that it’s a known issue of sorts. The df plugin for collectd uses /proc/mount to determine which drives to check free space on and if / is in there twice, it tries to update the entry for / twice and causes the problem.
The solution is to add the following to the /etc/collectd/collectd.conf file:FSType "rootfs" IgnoreSelected true Then I restarted collectd and my logs were peaceful again.
Update 2014-04-10:
I was getting these errors again on one of my VPS hosts. In this instance, / only appeared once in /proc/mounts but /run was in there multiple times:root@new:/etc/collectd# cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0 devtmpfs /dev devtmpfs rw,relatime,size=1085360k,nr_inodes=271340,mode=755 0 0 tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=217328k,mode=755 0 0 tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=460860k 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0 root@new:/etc/collectd#
The solution is to ignore tmpfs instead of rootfs:
FSType "tmpfs" IgnoreSelected false -
Choosing passwords for the 21st century
The recent Mat Honan hack got me thinking about password strength. It turns out he was hacked not due to having a poor password, but because of a security flaws in Amazon and Apples’ systems. Nevertheless it serves as a good reminder to keep yourself safe.
One thing you can do is use very long passwords for important things. Increasing the length of your password can make it seriously more difficult for anyone to brute force attack your password.
To get an idea of the impact a long password, have a look at this site: How Big is your Haystack. It lets you type in a password and it gives you an idea of how long it would withstand a brute force attack for. Obviously don’t type your real password in, but type in something that uses the same number of letters, numbers, capitals and punctuation and see how it looks.
8 lower case letter passwords? 2.17 seconds in an offline attack scenario. It’s not until you get up to 17 lower case letters that it pushes the offline attack scenario into the the virtually impossible range.
So how do you go about picking a strong password?
Diceware. Essentially you roll a dice 25 times to form 5 groups of 5 numbers. Then you look each number up in the list of words to generate a 5 word password. Being 5 words makes it relatively easy to remember but also very long.
If you don’t feel like rolling dice, you could consider using random.org to generate a list of numbers for you. If you choose this approach, make sure to visit the site using https and get a nice long list and choose a set of numbers from the list. Write it down on a piece of paper and put it in a safe place. Note this is not as secure as using the offline dice rolling approach.
As a final note, consider using multi factor authentication if you can. Google have made it available for gmail and I recommend you sign up for it. -
CSS Arrows
cssarrowplease makes lovely speech bubbles in pure CSS.