ftp move

There is no move command in ftp client, but it’s possible to do move with help of command rename. Make sure, that directory, into which you are going to move a file, exists.

Example: Let’s say, there is a file abc.war in a current directory, and we would like to move it into new directory alpha/beta/gama

ftp>mkdir alpha
ftp>mkdir alpha/beta
ftp>mkdir alpha/beta/gama
ftp>rename abc.war alpha/beta/gama/abc.war

Posted in workday | Leave a comment

NanoHTTPD Simple Webserver in jar

NanoHttpd is an open-source, small-footprint web server project with github repository. If SimpleWebServer is compiled and jarred into executable jar nanoSimpleWWW.jar, it has size less than 48 kB! Everything what is needed to start is from a directory with HTML files, including index files like index.htm or index.html For example like this:

java -jar nanoSimpleWWW.jar

and you may look at your web page at http://localhost:8080, or you may define more parameters, for example:

java -jar nanoSimpleWWW.jar -p 80 -d C:\Users\Admin\webRoot -q

and look at your web pages at default port http://localhost, quietly without messages about pages being served. Java version at least 1.6 is needed.

Posted in workday | Leave a comment

From Formamide to RNA

There is a fascinating research going on, how could life developed billions years ago from simple compounds. Maybe the key was formamide. Se more at article From Formamide to RNA, the Path Is Tenuous but Continuous by Samanta Pino, Judit E. Sponer, Giovanna Costanzo, Raffaele Saladino and Ernesto Di Mauro.


Posted in workday | Leave a comment

Tips for wget

Amit Agarwal wrote recently really nice list of tips for well known utility wget. At the end, there is a little quiz, following wget command:

wget ‐‐span-hosts ‐‐level=inf ‐‐recursive dmoz.org

The first option ‐‐span-hosts will allow to download from all links, the second option ‐‐level=inf (or ‐‐level=0) will specify infinite retrying. With conbination of the third option ‐‐recursive we’ve crawler with root at Open Directory Project – dmoz.org.

Posted in workday | Leave a comment

More stylesheets with LESS

There is an excellent article on IBM developerWorks website “Do more in CSS with LESS“.  It describes how to use LESS to write readable and maintainable Cascading Style Sheets.  Unfortunatelly command line command using Rhino to compile LESS to CSS changed from the version  in the article. Here is batch file with one parameter filename without extension, which can be used for version 1.7.5. For example from myfile.less would create myfile.css:

set lessD=C:\Users\Owner\lessRhino
java -jar %lessD%\js.jar -f %lessD%\less-rhino-1.7.5.js %lessD%\lessc-rhino-1.7.5.js %1.less > %1.css

Posted in workday | Leave a comment

Regular expression in JEdit

JEdit is an excellent editor and includes search and replace with regular expressions. For subexpressions in the replacement area is using dolar sign $ instead of backslash \. Here is a small example. Second occurence of substring cv needs to be replaced by substring s1.

String: array(‘ab’ => ‘156.2’, ‘cv’ => ‘99.9999’, ‘cv‘ => ‘9.9999),
Search for:(.*?cv)(.*)cv(.*)
Replace with:$1$2s1$3

New string: array(‘ab’ => ‘156.2’, ‘cv’ => ‘99.9999’, ‘s1‘ => ‘9.9999),

Posted in workday | Leave a comment

AWS Free Tier

Amazon AWS Free Tier is a Virtual Private Server (VPS), something to try and play with for up to one year. After creating AWS account one can use any of the 18 products and services for free within certain usage limits: Amazon – EC2, S3, Mobile Analytics, Cognito, DynamoDB, EBS, CloudFront, RDS, ElastiCache, ELB, SNS, Elasti Transcoder, SQS, SWF, SES, CloudWatch; AWS – Trusted Advisor, Data Pipeline.

Posted in workday | Leave a comment

Web user experience at Groasis

Groasis is a wonderful project, which allows to grow plants in arid areas or even deserts. Their blog is wonderful also from web user perspective. If user is zooming up, the main article fills up the screen, and with more zooming, font gets even larger. This design is great for text readability. Not speaking about good points in blog itself.

Posted in workday | Leave a comment

PHP Composer

Composer is very useful tool or better dependency manager for PHP. Matthieu Moquet wrote excellent blog post about 5 features to know, and I am sure there is more about Composer on his blog posts.
Here is summary of the command line examples, learn to know, what they do:

$ composer update foo/bar
$ composer update nothing
$ composer update --lock
$ composer require "foo/bar:1.0.0"
$ composer init --require=foo/bar:1.0.0 -n
$ composer create-project doctrine/orm path 2.2.0
$ composer init --require="twig/twig:1.*" -n --profile
$ composer update symfony/yaml --prefer-source
$ composer status -v
$ composer update
$ composer dump-autoload --optimize
Posted in workday | Leave a comment

EXIF info from ISS

There is beautiful picture of the rising Orion from International Space Station. What is really nice, one can look at EXIF info, in this case by jhead program.
Rising Orion from ISS
Here is the info:

File name    : iss040e017069.jpg
File size    : 1246427 bytes
File date    : 2014:06:27 23:29:37
Camera model : NIKON D3S
Date/Time    : 2014:06:23 09:16:03
Resolution   : 4256 x 2832
Flash used   : No
Focal length : 28.0mm  (35mm equivalent: 28mm)
Exposure time: 1.000 s
Aperture     : f/1.4
ISO equiv.   : 5000
Whitebalance : Auto
Metering Mode: pattern
Exposure     : Manual
Exposure Mode: Manual
JPEG Quality : 84
Comment      : NASA#2007931
======= IPTC data: =======
City          : ←%G
Record vers.  : 0
DateCreated   : 20140623
Time Created  : 091603+0000
Posted in workday | Leave a comment