lunes, 22 de junio de 2015

My return random.randint(0, 1)

Hi everybody, i didn't posted like before days.
But the summer arrive and i will try posts new content. Now a days i publised a lot of commits and PR's (pull request) in my github account ( i will try posted all interesting things in my blog.

This is only a notify posts but the next posts i promise i published interesting things.

Thanks for followme @endika_iglesias

domingo, 1 de febrero de 2015

How to check if my website this ON?

With Selenium language, is very easy. Only need installed selenium python library.
Simple example using Selenium library
browser = webdriver.Firefox()
assert 'Google' in browser.title
In this example only checked if has the "Google" title.

Now, if don't has the correct title the webs site, takes a screenshot.
browser = webdriver.Firefox()
if 'Google' not in browser.title:
    base64 = browser.get_screenshot_as_base64()
Finally, you can program tasks to check your websites and send email on error. If you want see the full example code go to this url Github/Endika/test_script/

miércoles, 21 de mayo de 2014

[SOLVED] Servers Digital Ocean with timezone problems

use this command
cp /usr/share/zoneinfo/Europe/Madrid /etc/localtime 

lunes, 19 de mayo de 2014

How to create certificates in a single line

complete as follows
/C= Country Name (2 letter code)
/ST= State or Province Name (full name)
/L= Locality Name
/O= Organization Name
/OU= Organizational Unit Name
openssl req -new -newkey rsa:4096 -days 2 -nodes -x509 -subj "/C=SP/ST=Madrid/L=Madrid/O=Empresa/OU=Internet Services/" -keyout server.key  -out server.cert
view example in github

lunes, 17 de febrero de 2014

Solution jQueryMobile viewport tag

If we use the jQueryMobile library, it may not work the viewport tag
Si usamos la librería jQueryMobile es muy posible que tengamos problemas para que nos funcione la etiqueta viewport
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
It has very easy solution. First step to remove the label.
Bueno por suerte tiene muy fácil solución. Primer paso eliminar la etiqueta.
Second step, add an instruction using javascript with jquery.
Segundo paso, añadimos mediante una instrucción javascript con jquery.
jQuery(document).bind('mobileinit', function(){ = 'width=device-width, minimum-scale=1, maximum-scale=2';
With this statement, we can zoom in on our mobile device.
Con esta instrucción, podremos hacer zoom en nuestro dispositivo movil.

jueves, 6 de febrero de 2014

Translate the organization number of internal number of SAP

    CALL METHOD cl_crm_org_management=>get_instance
        ev_instance = lv_orgman.

    CALL METHOD lv_orgman->get_sales_org_of_vkorg
        iv_vkorg            = lv_s_vkorg
        ev_sales_org        = lv_sales_org
        crm_key_not_defined = 1.

How to delete the zeros of a variable?

Use this function, and convert 00001 to 1.
      input  = lv_partner
      output = lv_partner.

lunes, 3 de febrero de 2014

SAP Cheat Cube CRM version

Copying the idea of Cube Cheat. I have prepared one. You may download the image and print it for your personal use.

Copiando la idea de los Cheat Cube. He preparado uno. Podéis descargar la imagen sin problema he imprimirla para vuestro uso personal.

Here is a preview of the final result.

Aquí una preview del resultado final.

sábado, 18 de enero de 2014

Get BP number with customer user (Obtén el numero de BP con el usuario del cliente)

Only use one function. It's very simple.

          user       = sy-uname 
          og_partner = lv_bp.

sy-uname is the global variable in ABAP contains the current user.
lv_bp is the local variable containing BP code.

Read structures and get the sales manager (leer la estructura y obtener el jefe de ventas)

For example, i need to get my sales manager of the organizational structure. The function is this
      act_otype      = 'BP'
      act_objid      = partner_no #enter de Partner number
      act_wegid      = 'BP-CP-O'  #we indicate that we want to get
      act_tdepth     = 0
      result_tab     = lt_result #here the result
      no_plvar_found = 1
      no_entry_found = 2
      OTHERS         = 3.