Wednesday, November 13, 2013

Disable message "This site has requested that you identify yourself with a certificate:" in Thunderbird

Thunderbird as one(not the only one) annoying feature that it keeps asking you to chose a certificate to identify yourself. The text in the box is: "This site has requested that you identify yourself with a certificate:", then there is a drop-down menu to chose among your certificates, then there is a checkbox that says "Remember this decision", then the buttons "OK" and "Cancel".

Very nice, too bad it asks you for input every single time it needs to authenticate... this is real annoying, it seems the checkbox is there to taunt, because it feels Thunderbird cannot remember your decision...

The solution is simple, but you need to open the config editor "about:config":
  • Linux: Edit/Options -> "Advanced" section -> "General" tab -> "Config editor" button.
  • Windows: Tools/Options -> "Advanced" section -> "General" tab -> "Config editor" button.
  • Mac: Thunderbird->Preferences...->"Advanced" section -> "General" tab -> "Config editor" button.

Search for the entry "security.default_personal_cert" and change it to "Select Automatically" (default value is "Ask Every Time").

This information was collected from mozillazine forum http://forums.mozillazine.org/viewtopic.php?t=652927

Friday, October 04, 2013

Extend LVM volume

To extend a LVM volume, you need to add a physical volume. If you don't have the partition create, you need to create one using, the partition should be type Linux LVM (8E): cfdisk /dev/sda
After create the partition (you might need to reboot to see it.), create e physical volume
pvcreate /dev/sda3
Now you have to add physical volumes to a volume group:
vgextend VolGroup /dev/sda3
(you can figure out the name of you volume group run vgdisplay)
Now you need to extend your logical Volume to use the new space(you need to know how much will be the total size):
lvextend -L 8.5G /dev/mapper/VolGroup-lv_root
Now finally you can extend the filesystem, simply run:
resize2fs /dev/VolGroup/lv_root

Friday, July 12, 2013

Disable screen blanking during XBMC

I'm having a problem: the screen saver starts during the playing of movies in XBMC. Only XBMC is running and the screen blanks after 10min. I found the commands that disable it, but I still lack a way to do it permanently:
export DISPLAY=localhost:0.0
xset dpms 0 0 0
xset -dpms
xset dpms force on
xset -q
To make the changes permanent I added the following lines in the file
~/.xbmc/scripts/autoexec.sh

xset dpms 0 0 0
xset dpms force on
echo $(date) '~/.xbmc/scripts/autoexec.sh: Touching xset' >> ~/myxbmc_log.txt
xset -q >> ~/myxbmc_log.txt
echo $(date) '~/.xbmc/scripts/autoexec.sh: Checking screensaver:' >> ~/myxbmc_log.txt
gnome-screensaver-command --query >> ~/myxbmc_log.txt

Friday, March 01, 2013

Missing feature in MacOS mail: Archive

Thunderbird has a very nice feature, the archive button, that will send the selected emails into an archive folder.
So I created a service that does that, it will go through the selected emails, and it will archive them in "[Gmail]/All Mail" if the account server contains the string gmail, and Archive/<year> if not. 

The workflow can be found here.
 TODO: is still error handling if the destination mailbox does not exist.

To Install unzip to the folder ~/Library/Services.

Saturday, February 02, 2013

thunderbird signin problem

certificate problem
Could not verify this certificate for an unknown reason

Solution, check the certification autority->Edit trust and possibility to:
  •  this certificate can identify websites
  • this certificate can identify mail users

Burning an DMG into a USB drive using macOS X snow leopard

To burn a dmg to a usb drive, you only have to open Disk utility Select the destination partition or the origin image, right click a choose restore, then you will be lead to a dialog window were you can specify the origin and destination of the restore. Then click restore and you are done. Simple right? But when thing simply do not work? So I had just clicked restore and I see the message:
So I need to scan the image? Easy, in Disk utility go to Image->Scan image for restore... . Select the image you want to scan and click scan. Insert the administrator password and you are all done, right? Wrong, I got this very useful message:
What do you mean, "invalid argument" ??? I'm not using command like this is a freaking GUI!!! You should figure what arguments are to be used! Oh well, lets see the log file for some info:
And the log file says the problem was "invalid argument"! Great! Very useful! Google time.... After a bit of search I came to the website and there was a comment:
So... Snow leopard cannot scan a read/write image? Ok, sounds we are back in the right track, lets convert this sucker. To convert an image go to the Disk utility and select Images->Convert... . You get a window asking for you to select the original image, and then you are let to the window with the destination options, make sure you select the image format to read-only:
And wait... After that is done, you still need to scan the image, in Disk utility go to Image->Scan image for restore... , This time it is working:
And.... Worked!
So now I'm ready to burn the image into a USB drive... The thing I actually want to do. So I right click on the destination partition, and select Restore:
Then I'm back to the dialog where I have to select restore image and destination.
I press restore and this time I'm successful.

One more thing...

Another thing, apparently the destination partition has to be a "Mac OS Extended (Journaled)", and the partition table has to be "GUID Partition Table". The partition type will be asked of you by the Disk utility when you create the partition, but for the partition type, you have to click the button "Option..." and then select the GUID partition type:

Sunday, January 13, 2013

Thursday, January 03, 2013

Free audiobooks

You can use google to find free audiobooks from audible, the search string is:

 $0.00 -Excerpt -Interview -Chapter -Extract -Speech -Sample -"A Conversation" -"This is Audible" site:audible.com 
or you can follow the link here. Tip from lifehacker.

Thursday, September 27, 2012

nvPy - mlty-platform notacional velocity

Notacional velocity is a very nice note taking application for mac, now there is also nvPy, according to the author:
nvpy is a simplenote-syncing note-taking tool inspired by Notational Velocity (and a little bit by nvALT too) on OSX and ResophNotes on Windows. It is significantly uglier, but it is cross-platform. Yes, you heard right, you can run this on Linux (tested), Windows (tested) and OS X (lightly tested).

The url is https://github.com/cpbotha/nvpy

Friday, July 06, 2012

Here are some useful shortcut keys for the open/save dialog window of macos X:
Spacebar – View the selected item in Quick Look
Command+D – Selects Desktop as the destination
Command+Shift+H – Sets the Home directory as the destination
Command+Shift+A – Sets Applications directory as the destination
Command+Shift+. – Toggle invisible items
Command+Shift+G – Bring up Go To Folder window
Tab – Tab key auto-completes paths and file names from the aforementioned Go To window
Command+R – Open the selected item in the Finder
Command+F – Move the cursor to the Find field
Command+. – Close the Open/Save dialog window

Wednesday, June 13, 2012

Monday, May 07, 2012

I was getting annoying messages in the console tty1-8:
[34895.467445] jme 0000:02:00.5: eth0: UDP Checksum error
[34896.613044] jme 0000:02:00.5: eth0: UDP Checksum error
[34896.620748] jme 0000:02:00.5: eth0: UDP Checksum error
[34896.727510] jme 0000:02:00.5: eth0: UDP Checksum error
[34896.933031] jme 0000:02:00.5: eth0: UDP Checksum error
I tried to fix it playing with the system log /etc/rsyslog.d/50-default.conf, but that was not it, I could get a copy of the stream to a file, but not prevent the stream from flooding my screen. The solution was the kernel printk definition. running teh line sudo sysctl kernel.printk="3 4 1 7" it stopped the messages, looking around this variable is defined in /etc/sysctl.conf, so I uncommented the line
# Uncomment the following to stop low-level messages on console
kernel.printk = 3 4 1 3
This solved my problem permanently. NEW SOLUTION from http://theamdara.blogspot.fr/2014/01/linux-jme-micron-udp-checksum-error.html
ethtool -K eth0 rx off

Friday, April 13, 2012

MacOS X Dicionary shortcut

To access the inbuilt MacOS Dictionary you can select a word and press ctrl-cmd-d, you will get the dictionary entry for the selected word. This only works in the more integrated programs: Safari, iWork, etc..

Wednesday, April 04, 2012

dfc: df in color

Very nice program that does the same as df, but with pretty colors. You can find it in the development page http://projects.gw-computing.net/projects/dfc

Tuesday, April 03, 2012

split2flac: slip a audio file

split2flac splits one big APE/FLAC/WV/WAV audio image (or a collection of such files, recursively) with CUE sheet into FLAC/M4A/MP3/OGG_VORBIS/WAV tracks with tagging, renaming, charset conversion of cue sheet, album cover images. It also uses configuration file, so no need to pass a lot of arguments every time, only an input file.
https://github.com/ftrvxmtrx/split2flac
from onethingwell

Thursday, March 29, 2012

emacs: Cycle windows backward

To cycle windows in emacs you can use the shortcut c-x o that executes the command other-window. Now to cycle windows in the reverse order you need to execute the command other-window with argument -1 (other-window accepts integer as argument, being the number of windows to jump). So I added this code to my .ecmas file:
;; cycle windows in reverse order
(defun prev-window ()
  (interactive)
  (other-window -1)
)
(global-set-key (kbd "C-x p") 'prev-window)
This will create the command prev-window and assign the shortcut C-x p to this function. Note: C-x p is by default assigned to narrow-to-page, a function I never used... This Idea I found it originally in Quora.com

Resize windows in emacs

To easily resize windows in emacs I added the following key shortcuts:
;; * \author Pedro Parracho   
;; Resizing windows using alt-arrow
 (global-set-key (kbd "\033[1;9D") 'shrink-window-horizontally) ;;alt-left: code ^[[1;9D                                                    
 (global-set-key (kbd "\033[1;9C") 'enlarge-window-horizontally) ;; alt-right: code ^[[1;9C                                                 
 (global-set-key (kbd "\033[1;9A") 'shrink-window) ;; alt-up: code ^[[1;9A                                                                  
 (global-set-key (kbd "\033[1;9B") 'enlarge-window) ;; alt-down: code ^[[1;9B                                                               
Now alt-arrow will change the window size by a step.

Monday, March 26, 2012

GNU screen renumber windows

When working a long time with a screen session, you might get holes in the screen numbering, to change the number of the current windows do ctrl-a : number <number>
There is a script that will renumber all the windows in a session, you can find it in http://brainscraps.wikia.com/wiki/Renumbering_GNU_Screen_Windows

Swap two characters in emacs

To transpose 2 characters the emacs command is transpose-chars and the shortcut is C-t.
For words the command is transpose-words and the shortcut is M-t.

Thursday, March 22, 2012

Go to next unread message in Mail via keyboard

A long standing annoyance in Mail is that there is no keyboard shortcut to skip to the next message. I found in hints.macworld.com a apple script that will jump to the next unread mail on ctr-n.
I changed the script to jump to the last item and not the first, as I like to read my messages by chronological order.
try
 tell application "Mail"
  activate
  tell the front message viewer
   set unreadMessages to (the messages whose ¬
    read status is false) as list
   if (count of unreadMessages) is not 0 then
    set selected messages to {the last item of unreadMessages}
   else
    beep
   end if
  end tell
 end tell
on error error_message
 beep
 display dialog "Error looking for next unread message: " & ¬
  return & return & error_message buttons {"OK"} default button 1
end try
To have this script activated, instead of copying it to the mail script folder as suggested in the article, I created a new service with "no input" in "Mail.app" that will run the apple script on the top. Saved the service, and added the shortcut ctrl-n in the keyboard settings.