www.numberspeaks.com

BLOG

Geektool : Display system information on your MacOS X desktop

If you would like to display system information on your desktop of your Mac OS X, Geektool is the right utility you need. First download and install geektool : https://www.tynsoe.org/v2/geektool/ Open geektool app. Drag and drop Shell on your desktop, and click on command button Paste this code bellow to display your local ip and public ip. But you will need to replace 192.168.101 by your network ip address. Result :

windows logo

Kill remote desktop session

Remote desktop sometimes gives me this error message “The terminal server has exceeded the maximum number of allowed connections.” It means my previous remote desktop session has been lost or allowed connections are full. I order to solve this, if you don’t mind losing your unsaved work, you will need to kill a session to open a new one, replace 192.168.1.1 by your server’s IP on the following command.

Fail2ban Odoo 9 Authentication

Odoo 9 community doesn’t come with autoban security. Fail2ban is an alternative to secure Odoo authentication. For more information concerning fail2ban click here Let’s start with creating a new filter: Paste the content from bellow code: Add those line in jail.local Change the value of syslog in the /etc/odoo/openerp-server.conf Restart Odoo then fail2ban to apply modification.

Create scheduled actions Odoo 9

Scheduled actions can be set by adding this code in your xml file. This exemple will call the function schedule_action from the model hr.employee and send a notification by email if the boolean enable_send_notification is True. This model inherits hr.employee and defines 1 additional field, and 2 additional functions. send_notification is sending email based on the the template my_module.email_hr_employee_notification, see this post how to create email template with xml, schedule_action is the function called by the scheduler.

Start stunnel on Mac OS X Sierra startup

This file will start automatically sTunnel daemon on your Mac Os Sierra computer. sudo vi /Library/LaunchDaemons/macports.stunnel.plist for more information concerning sTunnel, OpenVPN setup please read this post: Make OpenVPN stealthy with stunnel on Mac OS and Debian