This is useful when you need the fingerprint to identify via TLS
Get the raw certificate:
echo Q | openssl s_client -connect mail.example.com:443 Copy and paste the scribble from —–BEGIN CERTIFICATE—– to —–END CERTIFICATE—– to a file called cert.pem. Including —–BEGIN CERTIFICATE—– as first and —–END CERTIFICATE—– as last line.
Generate the SHA1 fingerprint by issuing following command:
openssl x509 -in cert.pem -sha1 -noout -fingerprint
Create a public ssh key, if you haven’t one already. Look at ~/.ssh. If you see a file named id_dsa.pub then you obviously already have a public key. If not, simply create one.
ssh-keygen -t dsa ItemMake sure your .ssh dir is 700:
chmod 700 ~/.ssh Get your public ssh key on the server you want to login automatically.
scp ~/.ssh/id_dsa.pub remoteuser@remoteserver.com: Append the contents of your public key to the ~/.
The Google Earth .DEB still depends on ia32-libs, but ia32-libs has been removed as part of the transition to multiarch, so it won’t install.
Steps Download the 64-bit google earth .deb file from http://www.google.com/earth mkdir earth dpkg-deb -R google-earth*.deb earth edit the file earth/DEBIAN/control and replace the Depends line as shown below dpkg-deb -b earth earth.deb dpkg -i earth.deb apt-get install -f Replace
Depends: lsb-core (>= 3.2), ia32-libs with
I have been looking around for some good examples to use the new PHP autoloader interoperability standard according to the PHP Standards Recommendation #0 (PSR-0).
And since I could find anything good, I had to figure it out by my self, here is the result.
gist id=3027247
HowTo:
<?php # Adds your library to the beginning of the php include path addInclude('~/code/libs', FALSE); $loader = new SplClassLoader(); # adds the php include path to the class $loader->setIncludePathLookup(true); $loader->add('Zend'); $loader->add('PEAR'); # Give the path if it isn't in the php include path like this $loader->add('Symfony', '/path/to/symfony'); $loader -> register(); ?
If you ever work on a remote servers network settings then this script may safe you from having to call support, and waiting on them.
When started/executed it
Sleeps first for 1 hour Then it renames the ”/etc/network/interfaces” file by adding the current time stamp to the end of the file It renames a file called ”/etc/network/interfaces.org” to ”/etc/network/interfaces” And finally it restarts the server. It also warns you a couple minutes before it does all that so you can terminate the program.
Have you ever executed something on the linux shell and didn’t remember later how it was done?
Well if you remember just part of it you can search for it:
history | grep -i "[search string]"
How to install PHP 5.3.X as secondary php version from source
PHPV=5.3.6
cd /usr/local/src
wget http://us.php.net/get/php-$PHPV.tar.gz/from/this/mirror
mv mirror php-$PHPV.tar.gz
tar xzvf php-$PHPV.tar.gz
chown -R $USER:$USER php-$PHPV/
cd php-$PHPV/
apt-get install libxml2-dev libssl-dev libcurl4-gnutls-dev libjpeg62-dev libpng12-dev libfreetype6-dev unixodbc-dev
./configure --prefix=/usr/local/php5.3 --with-config-file-path=/usr/local/etc/php5.3 --with-config-file-scan-dir=/usr/local/etc/php5.3/$SAPIconf.d --with-libdir=/lib --disable-cgi --with-libxml-dir=/usr/ --with-mysql=/usr/ --enable-pdo --with-pdo-mysql --with-mysqli --with-zlib-dir=/usr --with-curl --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/lib --with-gettext --enable-mbstring --enable-soap --enable-ftp --enable-fpm --with-openssl
make
make test
make install
More help in case you have errors: PHP-Configure-und-Compile-Fehler