Preskočiť na hlavný obsah

Príspevky

Antix SMTP

Antix SMTP is awsome smtp server for developers. This allows you to configure and test the way SMTP servers work. You can create multiple hosts and ports. This fake SMTP server do not send emails actually, it's only for testing. Main features: Fake - will not actually send e-mails, no risk of accidentally e-mailing to a client  Testable - you can create the server in code, then test your e-mailing functions and check the server to confirm they have been sent Configurable - you can add multiple hosts as on different ports Extendable - you can write you own message storage, e.g. into the database

How to manually add new jdk to gentoo

#list available JDKs java-config-2 -L #download and unpack tgz from oracle, eg oracle-jdk-1.7 /opt/oracle-jdk-1.7 #link-to /opt/oracle-jdk-1.7 /usr/lib/jvm/oracle-jdk-1.7 #create file /usr/share/java-config-2/vm/oracle-jdk-1.7 VERSION="Oracle JDK 1.7.0" JAVA_HOME=/opt/oracle-jdk-1.7 JDK_HOME=${JAVA_HOME} JAVAC=${JAVA_HOME}/bin/javac PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" LDPATH="${JAVA_HOME}/jre/lib/i386/:${JAVA_HOME}/jre/lib/i386/jli/:${JAVA_HOME}/jre/lib/i386/xawt/:${JAVA_HOME}/jre/lib/i386/server/" MANPATH="${JAVA_HOME}/man" PROVIDES_TYPE="JDK JRE" PROVIDES_VERSION="1.7" # Taken from sun.boot.class.path property BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/jsse.jar:${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar" GENERATION="2" ENV_VARS="JAVA_H...

How to manually install package

When you corrupt your portage or something is wrong with your installation,you can manually download a package, compile and install it... Packages are located at  http://mirrors.kernel.org/gentoo/distfiles Code: cd /usr/src wget http://mirrors.kernel.org/gentoo/distfiles/PACKAGE-x.y.z.tar.bz2 tar -xf PACKAGE-x.y.z.tar.bz2 cd PACKAGE-x.y.z ./configure --prefix /usr make make install

Util to decode multilogs

tail -f /var/.../current | tai64nlocal but if you want to see e.g. in tinydns IP addresses, use next script... #!/usr/bin/perl -w #A program to decode tinydns logfiles #Written by Sean Hunter #Copyright (c) 2001 Uncarved Systems Ltd # #This is free software released under version 2 #of the GPL without warrantees of any kind use strict ; use IPC::Open2; #Requires djb's tai64nlocal to be in the path open2(*READTAI, *WRITETAI, ' tai64nlocal ' ); my %query_type = ( ' 0001 ' => ' A ' , ' 0002 ' => ' NS ' , ' 0005 ' => ' CNAME ' , ' 0006 ' => ' SOA ' , ' 000c ' => ' PTR ' , ' 000f ' => ' MX ' , ' 0010 ' => ' TXT ' , ' 001c ' => ' AAAA ' , ' 0021 ' => ' RT ' , ' 0026 ' => ' A6 ' , ...

JAVA 7: Underscores in Numeric Literals

In Java 7 an underscore characters (_) can be put anywhere between digits in a numeric literals.  If application code contains numbers with so many digits, you can use an underscore character to organize digits to the groups of three, four or as much as you want. This absolutly improves code readability. Examples: long myPayment   =  1_234_567L ; long phoneNumber = 0421_555_1234_5678L ; long niceColor   =  0x68_FE_A0 ; long someFlags   =  0b01101001_10010010 ; Rules for this feature  You can place underscore characters only between digits. You cannot place underscores in the following places: at the beginning or end of a number next to a decimal point in a floating point literal before an F or L suffix in positions where a string of digits is expected int n = _42; // WARNING! an identifier, not a literal! int n = 42_; // ERROR! underscores at the end of a literal float e = 2_.72; // ERROR! underscore...

LG panel L245WP HDMI display problem

If you have the LG panel L245WP-BN and have it connected over HDMI to an NVIDIA card under Windows Vista/7, you may encounter a problem where the image at resolution 1900x1200 is cropped and off-center. Here is the solution  http://www.voetsjoeba.com/misc/edid/

Git

Git is a free and open source, distributed version control system designed to handle everything from small to very large projects. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do. Eclipse plugin:  http://www.jgit.org/updates