Displaying Variables

#!/bin/shecho$length# 80echo length=$length# length=80echo this is $title# this is Greetings from Spaceecho${chapter}5 # chap5 - to display with no space between variable and other parts of string

Special Variables

#!/bin/sh$?# exit status of the last command$$# process number of the current shell$!# process number of the last background command$0# filename of the current script$# # number of arguments$n# arguments (n = 1, 2, ...)$@# equivalent of $1 $2 ... $n$*# same as $@

Arithmetic Operations (expr)

]]>https://ksbytes.wordpress.com/2016/01/03/shell-cheatsheet/feed/0ksbytesOld Tricks on New Canvashttps://ksbytes.wordpress.com/2016/01/03/old-tricks-on-new-canvas/
https://ksbytes.wordpress.com/2016/01/03/old-tricks-on-new-canvas/#respondSun, 03 Jan 2016 20:34:30 +0000http://ksbytes.wordpress.com/?p=620I found my old notes, which included creating some maths-based graphics using IBM PC BASICA (not Visual Basic, but some very old BASIC variation). Interestingly those algorithms still work with HTML5 Canvas with very minimal changes.
I used W3 Schools Try It Editor to draw them.

I would not recommend this method for large production-scale load tests, but for smaller tests it could be a quick and convenient way to retrieve and save some data from request, without changing script in any significant way. The performance of this piece largely depends on the the performance of the underlying hard disk, which is why it’s not good for large-scale performance. But it gives a lot of flexibility in how and what you write (e.g. each user could have its own file; the format of the file is absolutely up to you; you may do some statistics on the fly, and so on). Thus might be worth it.

That is: find all subdirectories of current directory; for each subdirectory, find all files, and print file count and path. Finally it sorts the result to show folders with most files on top
Note that the first entry is the folder itself. Also this script omits soft links and does not count sub-folders as files.

]]>https://ksbytes.wordpress.com/2013/11/03/google-map-earth-icons/feed/0ksbytesblue-pushpin.pngblue-pushpin_maps.pngwht-pushpin.pngwht-pushpin_maps.pngylw-pushpin.pngylw-pushpin_maps.pngred-pushpin.pngred-pushpin_maps.pnggrn-pushpin.pnggrn-pushpin_maps.pngpink-pushpin.pngpink-pushpin_maps.pngpal2/icon0.pngpal2/icon1.pngpal2/icon2.pngpal2/icon3.pngpal2/icon4.pngpal2/icon5.pngpal2/icon6.pngpal2/icon7.pngpal2/icon8.pngpal2/icon9.pngpal2/icon10.pngpal2/icon11.pngpal2/icon12.pngpal2/icon13.pngpal2/icon14.pngpal2/icon15.pngpal2/icon16.pngpal2/icon17.pngpal2/icon18.pngpal2/icon19.pngpal2/icon20.pngpal2/icon21.pngpal2/icon22.pngpal2/icon23.pngpal2/icon24.pngpal2/icon25.pngpal2/icon26.pngpal2/icon27.pngpal2/icon28.pngpal2/icon29.pngpal2/icon30.pngpal2/icon31.pngpal2/icon32.pngpal2/icon33.pngpal2/icon34.pngpal2/icon35.pngpal2/icon36.pngpal2/icon37.pngpal2/icon38.pngpal2/icon39.pngpal2/icon40.pngpal2/icon41.pngpal2/icon42.pngpal2/icon43.pngpal2/icon44.pngpal2/icon45.pngpal2/icon46.pngpal2/icon47.pngpal2/icon48.pngpal2/icon49.pngpal2/icon50.pngpal2/icon51.pngpal2/icon52.pngpal2/icon53.pngpal2/icon54.pngpal2/icon55.pngpal2/icon56.pngpal2/icon57.pngpal2/icon58.pngpal2/icon59.pngpal2/icon60.pngpal2/icon61.pngpal2/icon62.pngpal2/icon63.pngpal3/icon0.pngpal3/icon1.pngpal3/icon2.pngpal3/icon3.pngpal3/icon4.pngpal3/icon5.pngpal3/icon6.pngpal3/icon7.pngpal3/icon8.pngpal3/icon9.pngpal3/icon10.pngpal3/icon11.pngpal3/icon12.pngpal3/icon13.pngpal3/icon14.pngpal3/icon15.pngpal3/icon16.pngpal3/icon17.pngpal3/icon18.pngpal3/icon19.pngpal3/icon20.pngpal3/icon21.pngpal3/icon22.pngpal3/icon23.pngpal3/icon24.pngpal3/icon25.pngpal3/icon26.pngpal3/icon27.pngpal3/icon28.pngpal3/icon29.pngpal3/icon30.pngpal3/icon31.pngpal3/icon32.pngpal3/icon33.pngpal3/icon34.pngpal3/icon35.pngpal3/icon36.pngpal3/icon37.pngpal3/icon38.pngpal3/icon39.pngpal3/icon40.pngpal3/icon41.pngpal3/icon42.pngpal3/icon43.pngpal3/icon44.pngpal3/icon45.pngpal3/icon46.pngpal3/icon47.pngpal3/icon48.pngpal3/icon49.pngpal3/icon50.pngpal3/icon51.pngpal3/icon52.pngpal3/icon53.pngpal3/icon54.pngpal3/icon55.pngpal3/icon56.pngpal3/icon57.pngpal3/icon58.pngpal3/icon59.pngpal3/icon60.pngpal3/icon61.pngpal3/icon62.pngpal3/icon63.pngpal4/icon0.pngpal4/icon1.pngpal4/icon2.pngpal4/icon3.pngpal4/icon4.pngpal4/icon5.pngpal4/icon6.pngpal4/icon7.pngpal4/icon8.pngpal4/icon9.pngpal4/icon10.pngpal4/icon11.pngpal4/icon12.pngpal4/icon13.pngpal4/icon14.pngpal4/icon15.pngpal4/icon16.pngpal4/icon17.pngpal4/icon18.pngpal4/icon19.pngpal4/icon20.pngpal4/icon21.pngpal4/icon22.pngpal4/icon23.pngpal4/icon24.pngpal4/icon25.pngpal4/icon26.pngpal4/icon27.pngpal4/icon28.pngpal4/icon29.pngpal4/icon30.pngpal4/icon31.pngpal4/icon32.pngpal4/icon33.pngpal4/icon34.pngpal4/icon35.pngpal4/icon36.pngpal4/icon37.pngpal4/icon38.pngpal4/icon39.pngpal4/icon40.pngpal4/icon41.pngpal4/icon42.pngpal4/icon43.pngpal4/icon44.pngpal4/icon45.pngpal4/icon46.pngpal4/icon47.pngpal4/icon48.pngpal4/icon49.pngpal4/icon50.pngpal4/icon51.pngpal4/icon52.pngpal4/icon53.pngpal4/icon54.pngpal4/icon55.pngpal4/icon56.pngpal4/icon57.pngpal4/icon58.pngpal4/icon59.pngpal4/icon60.pngpal4/icon61.pngpal4/icon62.pngpal4/icon63.pngpal5/icon0.pngpal5/icon1.pngpal5/icon2.pngpal5/icon3.pngpal5/icon4.pngpal5/icon5.pngpal5/icon6.pngpal5/icon7.pngpal5/icon8.pngpal5/icon9.pngpal5/icon10.pngpal5/icon11.pngpal5/icon12.pngpal5/icon13.pngpal5/icon14.pngpal5/icon15.pngpal5/icon16.pngpal5/icon17.pngpal5/icon18.pngpal5/icon19.pngpal5/icon20.pngpal5/icon21.pngpal5/icon22.pngpal5/icon23.pngpal5/icon24.pngpal5/icon25.pngpal5/icon26.pngpal5/icon27.pngpal5/icon28.pngpal5/icon29.pngpal5/icon30.pngpal5/icon31.pngpal5/icon32.pngpal5/icon33.pngpal5/icon34.pngpal5/icon35.pngpal5/icon36.pngpal5/icon37.pngpal5/icon38.pngpal5/icon39.pngpal5/icon40.pngpal5/icon41.pngpal5/icon42.pngpal5/icon43.pngpal5/icon44.pngpal5/icon45.pngpal5/icon46.pngpal5/icon47.pngpal5/icon48.pngpal5/icon49.pngpal5/icon50.pngpal5/icon51.pngpal5/icon52.pngpal5/icon53.pngpal5/icon54.pngpal5/icon55.pngpal5/icon56.pngpal5/icon57.pngpal5/icon58.pngpal5/icon59.pngpal5/icon60.pngpal5/icon61.pngpal5/icon62.pngpal5/icon63.png1.png2.png3.png4.png5.png6.png7.png8.png9.pngA.pngB.pngC.pngD.pngE.pngF.pngG.pngH.pngI.pngJ.pngK.pngL.pngM.pngN.pngO.pngP.pngQ.pngR.pngS.pngT.pngU.pngV.pngW.pngX.pngY.pngZ.pngblu-stars.pngblu-blank.pngblu-circle.pngwht-stars.pngwht-blank.pngwht-circle.pngylw-stars.pngylw-blank.pngylw-circle.pngred-stars.pngred-blank.pngred-circle.pnggrn-stars.pnggrn-blank.pnggrn-circle.pngpink-stars.pngpink-blank.pngpink-circle.png1-lv.png2-lv.png3-lv.png4-lv.png5-lv.png6-lv.png7-lv.png8-lv.png9-lv.pngA-lv.pngB-lv.pngC-lv.pngD-lv.pngE-lv.pngF-lv.pngG-lv.pngH-lv.pngI-lv.pngJ-lv.pngK-lv.pngL-lv.pngM-lv.pngN-lv.pngO-lv.pngP-lv.pngQ-lv.pngR-lv.pngS-lv.pngT-lv.pngU-lv.pngV-lv.pngW-lv.pngX-lv.pngY-lv.pngZ-lv.pngblu-stars-lv.pngblu-blank-lv.pngblu-circle-lv.pngwht-stars-lv.pngwht-blank-lv.pngwht-circle-lv.pngylw-stars-lv.pngylw-blank-lv.pngylw-circle-lv.pngred-stars-lv.pngred-blank-lv.pngred-circle-lv.pnggrn-stars-lv.pnggrn-blank-lv.pnggrn-circle-lv.pngpink-stars-lv.pngpink-blank-lv.pngpink-circle-lv.png1_maps.png2_maps.png3_maps.png4_maps.png5_maps.png6_maps.png7_maps.png8_maps.png9_maps.pngA_maps.pngB_maps.pngC_maps.pngD_maps.pngE_maps.pngF_maps.pngG_maps.pngH_maps.pngI_maps.pngJ_maps.pngK_maps.pngL_maps.pngM_maps.pngN_maps.pngO_maps.pngP_maps.pngQ_maps.pngR_maps.pngS_maps.pngT_maps.pngU_maps.pngV_maps.pngW_maps.pngX_maps.pngY_maps.pngZ_maps.pngblu-stars_maps.pngblu-blank_maps.pngblu-circle_maps.pngwht-stars_maps.pngwht-blank_maps.pngwht-circle_maps.pngylw-stars_maps.pngylw-blank_maps.pngylw-circle_maps.pngred-stars_maps.pngred-blank_maps.pngred-circle_maps.pnggrn-stars_maps.pnggrn-blank_maps.pnggrn-circle_maps.pngpink-stars_maps.pngpink-blank_maps.pngpink-circle_maps.pngtrack-0.pngtrack-1.pngtrack-2.pngtrack-3.pngtrack-4.pngtrack-5.pngtrack-6.pngtrack-7.pngtrack-8.pngtrack-9.pngtrack-10.pngtrack-11.pngtrack-12.pngtrack-13.pngtrack-14.pngtrack-15.pngPOI.pngPOI.shadow.pngarts.pngbar.pngblue-dot.pngblue-pushpin.pngblue.pngbus.pngcabs.pngcampfire.pngcampground.pngcaution.pngcoffeehouse.pngconvienancestore.pngcycling.pngdollar.pngdrinking_water.pngearthquake.pngelectronics.pngferry.pngfiredept.pngfishing.pngflag.pnggas.pnggolfer.pnggreen-dot.pnggreen.pnggrn-pushpin.pnggrocerystore.pnghelicopter.pnghiker.pnghomegardenbusiness.pnghorsebackriding.pnghospitals.pnghotsprings.pnginfo.pnglandmarks-jp.pnglightblue.pnglodging.pngltblu-pushpin.pngltblue-dot.pngmarina.pngmechanic.pngmotorcycling.pngmovies.pngmsmarker.shadow.pngorange-dot.pngorange.pngparkinglot.pngpharmacy-us.pngphone.pngpicnic.pngpink-dot.pngpink-pushpin.pngpink.pngplane.pngpolice.pngpostoffice-jp.pngpostoffice-us.pngpurple-dot.pngpurple-pushpin.pngpurple.pngquestion.pngrail.pngrangerstation.pngrealestate.pngrecycle.pngred-dot.pngred-pushpin.pngred.pngrestaurant.pngsailing.pngsalon.pngshopping.pngsnack_bar.pngsnowflake_simple.pngsportvenue.pngswimming.pngtoilets.pngtrail.pngtree.pngtruck.pngwater.pngwaterfalls.pngwebcam.pngwheel_chair_accessible.pngyellow-dot.pngyellow.pngylw-pushpin.pngParameterized JUnit Testshttps://ksbytes.wordpress.com/2013/09/04/parameterized-junit-tests/
https://ksbytes.wordpress.com/2013/09/04/parameterized-junit-tests/#respondWed, 04 Sep 2013 20:30:02 +0000http://ksbytes.wordpress.com/?p=579Useful when multiple tests have the same structure, but have different inputs and produce different results. Here’s the skeleton:

where ${version.jmeter} is a JMeter version, e.g. 2.8:<properties> <version.jmeter>2.8</version.jmeter> </properties>

Unfortunately JMeter brings a lot of transitive dependencies, which can collide with project’s own dependencies. Most obvious are com.sun:tools, which is really part of JDK, and junit.

This is the only special entity in the pom.xml for JMeter plug-in project.

Advertisements

]]>https://ksbytes.wordpress.com/2013/02/18/jmeter-plug-in-development-setting-up-maven-project/feed/0ksbytesInfographic Toolshttps://ksbytes.wordpress.com/2013/02/12/infographic-tools/
https://ksbytes.wordpress.com/2013/02/12/infographic-tools/#respondTue, 12 Feb 2013 04:16:28 +0000http://ksbytes.wordpress.com/?p=562Tableau Public
Requires tool download (Windows only) and creation of the account, and allows to publish charts online, as well as store them as PDF or image. Very powerful set of graphs, and ability to create a dashboard. Allows to load data set from many different sources.

Infogr.am
Requires to create an account (Facebook / Twitter login can be used). Good selection of charts (data can be imported from Excel spreadsheets), which can also be wrapped into a few themes (and can contain graphical text, images and charts). Simple intuitive UI. No graphs or trees, however, and no option to export (can only publish online).

Easel.ly
Requires to create an account. You can choose a theme from many different templates, or create a new one from scratch. Shapes are a central piece of the design, and can create many different forms: from tree and graph to a diagram. Presentations can also contain images and graphic text, but no ability to create charts based on data. Can be published online or exported as JPG.

Many Eyes
IBM site, based on Cognos, that allows to visualize data sets. Site design, and user experience in general are quite outdated, clumsy and slow (Java applets are used to render charts). However has a decent set of chart types, diagrams, and maps. Result can be published online or exported as PNG.

Charts Bin
Requires to create an account. Allows to upload and visualize location-based data. Has a few options, and user interface is not very smooth. However what’s valuable is the ability to create interactive maps with data, allows to publish or download it as PNG.