- Lightning = a calendar
- Mailbox Alert = pop up a message for important emails (first set a rule to copy them to a folder, then right click on the folder to set the Mailbox Alert)
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Add-ons for Thunderbird
Labels:
alert,
calendar,
email,
linux,
notification,
plugin,
pop-up,
productivity
Pop up a message box in Ubuntu
Try gmessage, xmessage or zenity (in that order)
But none of them force the window to always appear over other windows.
But none of them force the window to always appear over other windows.
Labels:
alert,
email,
linux,
message,
notification,
pop-up,
productivity
Display upcoming code in Perl debugger
Type this after the debug session has started:
> @DB::typeahead=('v')
or
{{v
See also these questions and perldebug.
> @DB::typeahead=('v')
or
{{v
See also these questions and perldebug.
Labels:
code,
debugging,
IDE,
perl,
productivity
Delete a file starting with a dash
You accidentally created a file called "-.log"
To delete it, instead of
rm -.log
try
rm ./-.log
To delete it, instead of
rm -.log
try
rm ./-.log
Labels:
bash,
characters,
delete,
files
Reasons to split up a very long subroutine into several more subroutines
- Repetition
- If the same or very similar code is being called several times, it should be put into a subroutine to avoid code duplication.
- This is the most obvious reason.
- Clarity
- You should be able to read the code like English
- Reading the code in a top level subroutine or script should give an overview of what it does, without going into detail
- Each subroutine should be able to be easily described in one or two sentences
- Comments are not sufficient for this, as you would still have to scan through many pages to gain an understanding.
- This reason is controversial; Some people say repetition is the only valid reason (see 'dangers' below)
- Testing
- You should be able to test each conceptual part of the system separately.
- It should be obvious to which part of the system a unit test applies.
Dangers of the second two reasons:
- Too much abstraction, difficult to understand and follow code flow
- Code is slow because of overhead of creating and managing subroutines
Labels:
idea,
subroutines,
testing
Allow your customers to contact you easily
Live chat
olark is designed to let your customers chat to you. It works great on spoofcard.com.
It's also possible to use adium or pidgin in this manner.
Feedback
getsatisfaction is free, uservoice isn't. Maybe there are other services, too.
olark is designed to let your customers chat to you. It works great on spoofcard.com.
It's also possible to use adium or pidgin in this manner.
Feedback
getsatisfaction is free, uservoice isn't. Maybe there are other services, too.
Dedupe lines in place
in vim, select a list of values with shift-V (visual mode), and then type :sort u to sort them and remove duplicates.
Labels:
data,
duplicates,
sort,
unique,
vi
Password protect a directory in Apache
Put a .htaccess file in the directory you want to protect, containing:
AuthUserFile /full/path/to/your/htpasswd_file
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
require valid-user
AuthUserFile /full/path/to/your/htpasswd_file
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
require valid-user
Then use an online htpasswd generator to create the htpasswd_file at the location you specified for AuthUserFile above. Make sure this is outside your public webspace.
Labels:
apache,
directories,
password,
webserver
Add to breadcrumb trail in phpBB
Do this before loading the template:
$template->assign_block_vars('navlinks', array(
'FORUM_NAME' => "link display text",
'U_VIEW_FORUM' => "http://url-of-page"
));
$template->assign_block_vars('navlinks', array(
'FORUM_NAME' => "link display text",
'U_VIEW_FORUM' => "http://url-of-page"
));
Labels:
breadcrumb,
links,
navigation,
phpbb,
template,
ux
Subscribe to:
Posts (Atom)