Other Topics

Why Circumcised Penis and Burqa are on Main Agenda in European Politics?

It is circumcised penis and burqa that is troubling governments across Europe and helping far-right parties to win elections. European governments have declared both circumcised penis and burqa as far-right activists. The governments are determined to do something about it and they are taking the problem very seriously. For example, ban burqas from beaches in France.

Circumcised penis is really naïve in this whole scenario. As always, the penis is generously helping everyone actively and equally. Far-right parties should use circumcised penis on their flags as it is the reason for their existence but they think circumcised penis is responsible for all problems in EU lands. For example, Parties, like AfD in Germany, has poor circumcised penis on their main agenda. AfD boss, Frauke Petry, wants no such penises hanging around for unknown, or personal reasons. The mainstream parties think it is ok to have various types of penises to help EU economy going and to make Europe more diverse. Left-wing parties are very gentle and have no preferences when it comes to penis but I would suggest them to make use of circumcised penis for better Europe.

#JokesAusBerlin

Advertisements
Other Topics

books

 

RelextRECOMMENDED BOOKS

Title Author
Difficult Conversations: How to Discuss What Matters Most Douglas Stone
The Secret Language of Color: Science, Nature, History, Culture, Beauty of Red, Orange, Yellow, Green, Blue, & Violet Arielle Eckstut
Why Nations Fail: The Origins of Power, Prosperity, and Poverty Daron Acemoğlu
Effective Programming: More Than Writing Code Jeff Atwood
The Selfish Gene Richard Dawkins
A Short History of Nearly Everything Bill Bryson
Virtual Unreality: Just Because the Internet Told You, How Do You Know It’s True? Charles Seife
The Story of Art E.H. Gombrich
Guns, Germs, and Steel: The Fates of Human Societies Jared Diamond
1984 George Orwell
To Kill a Mockingbird Harper Lee
From There To Here: A Novel of Discovery Michael J. Tobias
The Prophet Kahlil Gibran
Moonwalking with Einstein: The Art and Science of Remembering Everything Joshua Foer
Where Good Ideas Come From: The Natural History of Innovation Steven Johnson
The Fast Diet: The Simple Secret of Intermittent Fasting: Lose Weight, Stay Healthy, Live Longer Michael Mosley
Gödel, Escher, Bach: An Eternal Golden Braid Douglas R. Hofstadter
The Fabric of the Cosmos (Space, Time, and the Texture of Reality) Brian Greene
Clean Code: A Handbook of Agile Software Craftsmanship Robert C. Martin
Thinking, Fast and Slow Daniel Kahneman
Picture a Tree Barbara Reid
Frankenstein’s Cat: Cuddling Up to Biotech’s Brave New Beasts Emily Anthes
Exploring the World of Lucid Dreaming Stephen LaBerge
Animal Wise: The Thoughts and Emotions of Our Fellow Creatures Virginia Morell
Other Topics, Software Technology - Development and Test Engineering, software testing

Running Your Ruby Application With Passenger and nginx With Self-Signed Certificate

I am not going to tell show you how to install ruby , rails etc rather I will write steps to install passenger with ngix and run your rails application with ssl.

If you only want to use passenger standalone then proceed to phusion passenger page. 

1. Install passenger gem

gems install passenger

2. Install passenger-nginx

rvmsudo passenger-install-nginx-module

when you run above command your will see following message with options to select

This installer will guide you through the entire installation process. It
shouldn’t take more than 5 minutes in total.

Here’s what you can expect from the installation process:

1. This installer will compile and install Nginx with Passenger support.
2. You’ll learn how to configure Passenger in Nginx.
3. You’ll learn how to deploy a Ruby on Rails application.

Don’t worry if anything goes wrong. This installer will advise you on how to
solve any problems.
Press Enter to continue, or Ctrl-C to abort.

3. Select 1

4. When language options are show then select the one with Ruby

5. Next is compilation options. Go with “download and compile option” if you want to keep it simple and don’t need any specific configurations

6. Keep default installation path ( /opt/nginx/)

Keep default installation paths and keeping your favorite key ENTER.

 

 

Software Technology - Development and Test Engineering, software testing

Maven + Surefire + Testng

If you are planning to write tests using Maven, Surfire and Testng then you may proceed  to the next lines.

1. Add dependency to your pom.xml

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
<scope>test</scope>
</dependency>

2. Write your test

@Test
public void myTest(){
}

3. Run Test
how to run a single test from command-line ?

mvn clean -Dtest=<your test> test -Dvar1=<value>

  • clean is to make sure your tests are recompiled
  • <your test> should be the complete path to the class e.g. package.com.mypackage.TestClassName#testMethod
  • -Dvar1 system variables that/those you might want to pass to your tests e.g. -VtestUrl=http://google.com

how to debug ?

mvn -Dmaven.surefire.debug test

debugging a single tests

mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test

How to run a testng from Eclipse IDE with arguments to the tests ?

  • Goto IDE and testng run configuration
  • Write in VM arguments
    •  -D<variable_name>=<variable value>
Other Topics, Software Technology - Development and Test Engineering, software testing

android test automation with Calabash

Requirements

  • JDK is installed
  • Ruby 1.9+ is installed
  • Android SDK is installed

If you get errors like one show below while setting up Calabash then your in the right place to fix it.

$ calabash-android run <my_apk>
 No test server found for this combination of app and calabash version. Recreating test server.
 /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:15:in `initialize': undefined method `scan' for nil:NilClass (NoMethodError)
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:104:in `new'
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:104:in `keystore_from_settings'
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:83:in `get_keystores'
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/bin/calabash-android-build.rb:5:in `calabash_build'
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/helpers.rb:92:in `build_test_server_if_needed'
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/bin/calabash-android-run.rb:16:in `calabash_run'
  from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/bin/calabash-android:85:in `<top (required)>'

1.Setup Environment Variables

Assuming you have installed Ruby and Java (JDK) on your machine.Also make sure your have required gems installed. If not following calabash

Examples:
export ANDROID_HOME=/Users/<user>/adt-bundle-mac-x86_64-20140702/sdk
export PATH=$PATH:$ANDROID_HOME
export PATH=$PATH:$ANDROID_HOME/tools

2. Sign the application, First!

keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Debug,O=Android,C=US"

This will generate a keystore in ~/.android/debug.keystore and you will use that for setting up .calabash_setting in the following steps

3. Generate a folder for your tests and set up. Navigate to the folder and run following 

android-calabash gen

This will generate a feature folder (cucumber folder structure)

4. Setup your calabash_setting run

calabash-android setup <path_to_your_apk> -v

This will generate a file .calabash_settings in current directory, open the file and set path to the key store generated in first step, which is android/debug.keystore…

5. Resign APK, If necessary

6. Run the application with

calabash-android run <your_apk>

7. Next Expected Error

calabash No connected devices

  • connect your device over USB
  • select an option that allows you to install and debug applications
  • make sure you have check Unknown sources under security 

 

8. Run tests again with calabash-android run <your apk>

Next write your tests using awesome cucumber 🙂

References

https://github.com/calabash/calabash-android

https://github.com/calabash/calabash-android/wiki/Running-Calabash-Android

https://github.com/calabash

https://github.com/calabash/calabash-android/issues/256

Other Topics, Software Technology - Development and Test Engineering, software testing

Calabash setup for automating android applications

If you get errors like one show below while setting up Calabash then your in the right place to fix it.

$ calabash-android run <my_apk>
No test server found for this combination of app and calabash version. Recreating test server.

/Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:15:in `initialize’: undefined method `scan’ for nil:NilClass (NoMethodError)
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:104:in `new’
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:104:in `keystore_from_settings’
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/java_keystore.rb:83:in `get_keystores’
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/bin/calabash-android-build.rb:5:in `calabash_build’
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/lib/calabash-android/helpers.rb:92:in `build_test_server_if_needed’
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/bin/calabash-android-run.rb:16:in `calabash_run’
from /Users/<user>/.rvm/gems/ruby-2.1.5/gems/calabash-android-0.5.4/bin/calabash-android:85:in `<top (required)>’

1.Setup Environment Variables

>

Assuming you have installed Ruby and Java (JDK) on your machine.Also make sure your have required gems installed. If not following calabash

Examples:
export ANDROID_HOME=/Users/<user>/adt-bundle-mac-x86_64-20140702/sdk
export PATH=$PATH:$ANDROID_HOME
export PATH=$PATH:$ANDROID_HOME/tools

 

2. Sign the application, First!

keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Debug,O=Android,C=US"

This will generate a keystore in ~/.android/debug.keystore and you will use that for setting up .calabash_setting in the following steps

3. Generate a folder for your tests and set up. Navigate to the folder and run following 

android-calabash gen

This will generate a feature folder (cucumber folder structure)

4. Setup your calabash_setting run

calabash-android setup <path_to_your_apk> -v

This will generate a file .calabash_settings in current directory, open the file and set path to the key store generated in first step, which is android/debug.keystore…

5. Resign APK, If necessary

6. Run the application with

calabash-android run <your_apk>

7. Next Expected Error

calabash No connected devices

  • connect your device over USB
  • select an option that allows you to install and debug applications
  • make sure you have check Unknown sources under security 

8. Run tests again with calabash-android run <your apk>

Next write your tests using awesome cucumber 🙂

Other Topics, Software Technology - Development and Test Engineering, software testing

Settingup RVM on Ubuntu 14.04 – a quicker’s steps

Open terminal and get signature needed for RVM

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

Before any other step install mpapis public key (might need gpg2) (seesecurity)

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

For development environment

\curl -sSL https://get.rvm.io | bash

Install RVM stable with ruby:  This is you need in production

\curl -sSL https://get.rvm.io | bash -s stable --ruby

Unless doing guided install you should read all sub-sections under the RVM Section.

Install RVM (development version):

\curl -sSL https://get.rvm.io | bash

Install RVM stable with ruby:

\curl -sSL https://get.rvm.io | bash -s stable --ruby

Run source /usr/local/rvm/scripts/rvm to use RMV

Installing Specific Ruby and Rails Versions And Create Gemsets

If you need to install specific versions of Ruby for your application, you can do so with rvm like this:

rvm install ruby_version

After the installation, we can list the available Ruby versions we have installed by typing:

rvm list

We can switch between the Ruby versions by typing:

rvm use ruby_version

We can use various Rails versions with each Ruby by creating gemsets and then installing Rails within those using the normal gem commands:

rvm gemset create GEMSET_NAME    # create a gemset
rvm ruby_version@GEMSET_NAME  # specify Ruby version and our new gemset
gem install rails -v rails_version   # install specific Rails version

Further Trouble Shooting 

If you have a rails then you should have a bundle, simply run following command inside your application directory.
bundle install

one last thing when you get mysql2 native build error

then run sudo apt-get install libmysqlclient-dev

The error looks like following
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20141118-14609-1mklcp7.rb extconf.rb
checking for ruby/thread.h… yes
checking for rb_thread_call_without_gvl() in ruby/thread.h… yes
checking for rb_thread_blocking_region()… yes
checking for rb_wait_for_single_fd()… yes
checking for rb_hash_dup()… yes
checking for rb_intern3()… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lm… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lz… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lsocket… no
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lnsl… yes

Javascript Runtime Error ??

If you get an error like following that means you need to install a java run time.

2/lib/execjs/runtimes.rb:51:in `autodetect’: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

run

sudo apt-get install nodejs