- Don't write code until you have a good spec.
- Every piece of code should do one thing, and do it well.
- Don't optimize.
- Don't optimize until you know it's the slowest part.
- Take the time estimate, double it, and round it up to the next largest time increment.
- Ask yourself what could break on every line.
- No, it doesn't make sense, but the user will do it.
- "Garbage In / Garbage Out", just make sure you know the garbage is in the format you expect.
diff -file differences
comm -file parts in common
Hijack This! Spyware remover.
Serious Hardware / Software Crap Wiki
If you are using the replacement of pine, Alpine, and it complains about an invalid Host to send, or [Error sending: No default posting command.], you can quickly fix this by editing the .pinerc in your home directory and changing the sendmail-path variable like so:
sendmail-path= /usr/lib/sendmail -oem -t -oi
Important apt-get commands:
apt 0.6.46 for linux i386 compiled on Sep 21 2006 10:33:09
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
Options:
-h This help text.
-q Loggable output - no progress indicator
-qq No output except for errors
-d Download only - do NOT install or unpack archives
-s No-act. Perform ordering simulation
-y Assume Yes to all queries and do not prompt
-f Attempt to continue if the integrity check fails
-m Attempt to continue if archives are unlocatable
-u Show a list of upgraded packages as well
-b Build the source package after fetching it
-V Show verbose version numbers
-c=? Read this configuration file
-o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
This APT has Super Cow Powers.
If you're trying to install Debian 4.0 in Microsoft Virtual PC 2007:
from boot of a cdrom (like netinst) use the flags: noacpi nolacpi
Set the network adapter to whichever network card you regularly have
connected to the internet (for apt-get'ing remotely). It doesn't matter how well that device is supported, virtual PC makes it look like a dec tulip adapter (even wireless devices!)
turn off BEEP in BASH shell
In /etc/inputrc you can put the line "set bell-style none" to turn off the beeping
Taking Microsoft Vista off of a HP Pavilion dv9000 (GD545AV) a6244n
Windows XP will run, and use all 3GB
Since drivers for XP are not "available", you have to hunt them down.
Intel PRO/100 VE Network Connection
GeForce 8300 GS
Intel E4500 65 nm 2MB L2 2.2 GHz 800 MHz
------------------------------------------------------------
Getting Postfix / IMAP Secure working with an iPhone
From Posfix and iPhones
The first order of business was to allow mail to be received on port 587, this is done by uncommenting the line starting with #submission in the postfix master.cf file. The submission port is a standard designation for port 587. If you would like to have postfix be able to receive mail on other ports, simply copy/paste that line, and change the word 'submission' to the desired port number, restart postfix, and postfix will now be listening on this new port. This may be handy for getting around certain networks that block the standard mail ports and want you to use their mail gateway. Having an alternate port you can send on may be handy to have in those rare occasions.
Also, setting up an encrypted key from Switching... Website, but it works on Debian just as well.
/etc/postfix:
openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509
You.ll have to add the following lines to file main.cf in /etc/postfix:
smtpd_enforce_tls = no
smtpd_tls_loglevel = 1
smtpd_use_tls = yes
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
Issue the command postfix reload to refresh the configuration of your mail server and your ready to test. Start a terminal and issue the following command:
telnet yourmailserveraddress 25
The server will answer with:
Trying yourmailserveraddress...
Connected to yourmailserveraddress.
Escape character is ^]
220 yourmailserveraddress ESMTP Postfix
Then type in:
EHLO yourmailserveraddress
And again your server will answer it.s capabilities:
250-yourmailserveraddress
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250 8BITMIME
Now it.s time to test TLS and enter in capitals:
STARTTLS
and the server should respond with:
220 Ready to start TLS
Then you know it will work, you could give your favourite email client a try.
Getting a memory offset of a variable in a struct in an array in C++
In a Unicode C++ MFC application reading a text file