— React-Native Programmierer . Patrick Tresp

in 1998, The Raspberry ketone diet drops Raspberry Ketones erection necessary for lovemaking. Research workers screened the African mango fat african mango

While working with reports for a service running on postgres, you want to make sure, that you can also run statistics on the data from that service. Most of the time, reports where made with same users, als the data was written ( experienced this in multiple companies ).

So lets take a step back and think of what reports are. It is analysis on data that is stored to create something humans can understand. Analysis does not change data, so we actually do not need any rights on that data – except reading.

To prevent a user that creates the analysis to change any data from the service, we will need to create a read-only user in postgres. This is pretty straight-forward, but also very often neglected

# log into postgres
sudo -upostgres psql postgres
# create user
CREATE ROLE readonly WITH LOGIN ENCRYPTED PASSWORD 'safe-password-here';
# connect to desired database
\connect 'database-name'
# grant select access and set default permissions

With this, the user shall be able to SELECT any of the tables in this schema, but not able to UPDATE any.

Read More

When getting serious in creating apps with react-native, there’s more than just react and some coding.
At some point you will need to digg into XCode and it’s gui, which is a pain in the a$$ i believe.

Thanks to this article: https://medium.com/@kelleyannerose/react-native-ios-splash-screen-in-xcode-bd53b84430ec creating a xcode storyboard file is now an easy thing and the most important functions are explained well.




Read More

First thing i needed to learn is to write externs.

Not all react-components that are available from scratch are ready-to-use with haxe-react-native (https://github.com/haxe-react/haxe-react-native).

For example to use the Button Component as described here: https://facebook.github.io/react-native/docs/button.html

you will get an Error Message similar to this:
Unknown identifier : Button

To use this Component as wanted, you will need do write an extern as documented here: https://haxe.org/manual/lf-externs.html

If you know what to to, just create a class in a packagename with identical name of the Component, you want to use:


With following content:
package com.packagemname.js.reactnative;

@:jsRequire('react-native', 'Button')
extern class Button extends react.ReactComponent {}

Now you are all set to use this component by importing the extern

import de.superclass.js.reactnative.Button;

and use it:
var button = cast jsx(<Button key="unique-key" title="hey" onPress={_onPress}></Button>\');

Read More

A Snippet which is very handy, is to determine, if something is above the fold AND also within the viewable area. Above the fold does not necessarily mean – visible.

var element = jQuery("#canvas");
var pageTopValue = element.offset().top + element[0].scrollHeight;
var viewable = jQuery(window).scrollTop()+ jQuery(window).height();
if( jQuery(window).scrollTop() > pageTopValue ){
 console.log( "Element hidden (above viewable area)" );
else if( viewable < element.offset().top ){
console.log( "Element hidden (below viewable area)" );
console.log( "Element visible! (within viewable area)" );
Read More


for i in *; do mv "$i" "$(echo $i|tr A-Z a-z)"; done

Read More

For months i have been struggling with a file on my desktop, which seems to come back all the time :“Clean Listener.jsx“.

Found out, that it is a file, that Photoshop creates when closing the application. Since I do not need a file like this on my System, i want to disable this

Just goto:

File->Scripts->Script Events Manager and disable the checkbox.

That’s it. Another couple seconds per day saved 🙂



Read More

Setting up a webserver is not one of the things i do daily, therefore a reminder:

Case-insensitivity in URLs might be explicit wanted on a specific domain on webserver.

Therefore create a .htaccess file containing those 2 lines

CheckSpelling On
CheckCaseOnly On

also slightly important is to change directorys rights and all containing date to „750“.

The Apache module mod_rewrite needs to be activated!


Read More

Transmit (http://panic.com/transmit/) is my weapon of choice when handling FTP Sessions.

Most of the Features I really appreciate is synchronization, so traffic will be minimized to its demand. When Usind repositories ( .git, .svn ) and also IDEs like Webstorm or FDT, a lot of sourcefiles are in the project folder, which just do not belong to a servers directories.

Therefore i believed in the preset rules, but they never applied. Found out, that the preset Rule is set to „all“ and not „each“ possibility of the following opportunities is correct ( german „alle“, und nicht „jede“ der folgenden Möglichkeiten ist richtig ) .

When set to „each“ synchronisation skips those folders and makes workflows even faster.



Read More
1023_1 – PhidgetRFID
Quelle: http://www.phidgets.com

As developing RIA is the focus of my work, sometimes it is nice to play around with some hardware programming or at least do some programming to control hardware.
Last time i did this is like 15 years ago and the result was to get a light bulb shining. Still think it is a little wonder 🙂

While searching a little bit, i did order this 1023_1 – PhidgetRFID, to read RFID Tags. http://www.phidgets.com/products.php?product_id=1023_1
My first weapon of choice is ActionScript 3.0 and i was surprised how easy this is to handle.

I used to be a person that does not read the manual – now i am 🙂
Sometimes its just easier to search for a solution while it is documented very well, e.g. for exact this device : http://www.phidgets.com/docs/1023_User_Guide

If using Phidget the first time, a look at the Phidget Control Panel helps ( Windows and OSX explained seperatly ) http://www.phidgets.com/docs/Phidget_Control_Panel

If connected properly, Coding might start.

Since it is really self-explaining, i won’t go through the code.

For now, the Actionscript Library is packed in some Examples which show already how to use phidgets API, which is located here with also a lot of documents for help: http://www.phidgets.com/docs/Language_-_Flash_AS3

* @author Patrick Tresp
* @see patricktresp.de | blog.patricktresp.de
import flash.text.TextFormat;
import flash.text.TextField;
import flash.display.Shape;
import com.phidgets.PhidgetRFID;
import com.phidgets.events.PhidgetDataEvent;
import com.phidgets.events.PhidgetErrorEvent;
import com.phidgets.events.PhidgetEvent;
import flash.display.Sprite;
* @author ptresp
public class PhidgetRFIDReader extends Sprite
private static const HOST : String = "localhost";
private static const PORT : uint = 5001;
private static const PASSWORD : String;
private var _phidgetRFID : PhidgetRFID;
public function PhidgetRFIDReader()
private function construct() : void
var phidgedRFID : PhidgetRFID = _phidgetRFID = new PhidgetRFID();
phidgedRFID.addEventListener( PhidgetEvent.DETACH, attachDetachHandler );
phidgedRFID.addEventListener( PhidgetEvent.ATTACH, attachDetachHandler );
phidgedRFID.addEventListener( PhidgetErrorEvent.ERROR, errorHandler );
phidgedRFID.addEventListener( PhidgetDataEvent.TAG, tagHandler );
phidgedRFID.addEventListener( PhidgetDataEvent.TAG_LOST, tagHandler );
phidgedRFID.open( HOST, PORT, PASSWORD );
private function attachDetachHandler( event : PhidgetEvent ) : void
switch( event.type )
case PhidgetEvent.ATTACH:
trace( "PhidgetRFIDReader.attachDetachHandler(event) PhidgetEvent.ATTACH" );
_phidgetRFID.Antenna = true;
_phidgetRFID.LED = true;
case PhidgetEvent.DETACH:
_phidgetRFID.Antenna = false;
_phidgetRFID.LED = false;
trace( "PhidgetRFIDReader.attachDetachHandler(event) PhidgetEvent.DETACH" );
private function errorHandler( event : PhidgetErrorEvent ) : void
trace( "PhidgetRFIDReader.errorHandler(event)", event.type, event.Error );
private function tagHandler( event : PhidgetDataEvent ) : void
switch( event.type )
case PhidgetDataEvent.TAG:
trace( "PhidgetRFIDReader.tagHandler(event) PhidgetDataEvent.TAG", event.Data );
displayStatus( true, String( event.Data ) );
case PhidgetDataEvent.TAG_LOST:
trace( "PhidgetRFIDReader.tagHandler(event) PhidgetDataEvent.LOST", event.Data );
displayStatus( false, String( event.Data ) );
private function displayStatus( connected : Boolean, RFIDTag : String ) : void
while ( numChildren &gt; 0 ) removeChildAt( 0 );
if ( RFIDTag !== "0/" )
var color : uint,s : Shape, tf : TextField , format : TextFormat, text : String;
color = connected ? 0x1B3A00 : 0x660000;
s = new Shape();
s.graphics.beginFill( color );
s.graphics.drawRect( 0, 0, stage.stageWidth, stage.stageHeight );
addChild( s );
text = RFIDTag + " ";
text += connected ? "found" : "lost";
format = new TextFormat();
format.font = "Arial";
format.size = 24;
format.color = 0xFFFFFF;
tf = new TextField();
tf.width = stage.stageWidth - 40;
tf.x = tf.y = 20;
tf.defaultTextFormat = format;
tf.text = text ;
addChild( tf );
Read More

Changing from svn to git is not that trivial, especially when you are barely touching the surface on what you are doing.
Translating the Error „check network settings“ can mean that the filesize you want to push is bigger than set in git configuration.

Didn’t expect it to be named like this, but changing the postBuffer in .gitconfig will make life little easier.

Add this 2 Lines in .gitconfig and you’ll have 500 MB Upload filesize limit at push.

postBuffer = 52428800

Read More