Skip to content

Instantly share code, notes, and snippets.

View lahdo's full-sized avatar

Marcin Rapacz lahdo

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lahdo on github.
  • I am lahdo (https://keybase.io/lahdo) on keybase.
  • I have a public key ASARzS8RUd_zJAeu-jFDl3o7BUTiIAtbY1B5Hr07L9UKMwo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am lahdo on github.
* I am lahdo (https://keybase.io/lahdo) on keybase.
* I have a public key ASARzS8RUd_zJAeu-jFDl3o7BUTiIAtbY1B5Hr07L9UKMwo
To claim this, I am signing this object:
@lahdo
lahdo / 1-one-row-expressions.js
Created March 22, 2017 10:33 — forked from olvnikon/1-one-row-expressions.js
Javascript tricky questions. Check yourself. Or destroy any interviewee.
// https://jsfiddle.net/vk35ok2o/50/
console.log('typeof 1/0 => ', typeof 1/0);
console.log('typeof (1/0) => ', typeof (1/0));
console.log('1/0 => ', 1/0);
console.log('"Hello" * 2 => ', "Hello" * 2);
console.log('typeof ("Hello" * 2) => ', typeof ("Hello" * 2));
console.log('typeof "Hello" * 2 => ', typeof "Hello" * 2);
console.log('typeof undefined => ', typeof undefined);
console.log('typeof null => ', typeof null);
console.log('typeof function(){} => ', typeof function(){});
@lahdo
lahdo / INSTALL.rst
Created November 17, 2016 14:44 — forked from dmugtasimov/INSTALL.rst
Web Portal installation instruction
@lahdo
lahdo / INSTALL.rst
Created November 17, 2016 14:44 — forked from dmugtasimov/INSTALL.rst
Tryton installation instruction

This installation instrucion describes how to install Tryton Server and Client from scratch for development purposes.

  1. Create virtualenv with virtualenvwrapper:

    mkvirtualenv -p /usr/bin/python2.7 trytond
    
  2. Install Tryton Server:

    pip install trytond==4.0.4
    

Web Editor workflow

1. Retrieve PAGE from the server.

Response will include HTML with div pointing the place where LAYOUT with BLOCKS will be injected.

This div has following format:

<div layout=""></div>
@lahdo
lahdo / how_to_embed_html.md
Last active October 26, 2016 16:10
how_to_embed_html.md
@lahdo
lahdo / order_users_by_age.js
Last active October 26, 2016 15:09
Function which returns the objects ordered by age.
/**
* Orders users by age
* @param {Array} users - array of object where each one contains a name (a string) and age (a number)
* @return {Array} sorted_array_of_users
*/
function order_by_age(users) {
var sorted_array_of_users = users.sort(compare("age", "ascending"));
return sorted_array_of_users;
}