Postări

Imagine

5Inch HDMI LCD for RPI 800x480

In order for the LCD to work ... my version Go clone from git the following git repository  LCD-show      After this, edit with your favorite text editor from console /boot/config.txt (sudo mcedit /boot/config.txt) my favorite is mc (sudo apt install mc -y) and of course, at the end of the file copy the settings from below make sure to have penirq=22 instead of penirq=25 if the touchscreen does not work   Finally for calibration if necessary do: sudo apt install -y xinput-calibrator and calibrate the screen: DISPLAY=:0.0 xinput_calibrator

.NET Core Dependency Injection with Func as constructor parameter

This post will be short and sweet, albeit one that caused me a bit of a headache. I recently worked on an ASP.NET Core project and I wanted to take advantage of the built-in Dependency Injection service to inject various services to the controllers. However, one of the services required a parameter in the constructor; to be more exact I was asked to create a unit of work for all the different zones that we have but the connection has to change for each region so this is the solution I came up with: The important magick is here:

rSync folders from one side to another

rsync -a --include='*/' --exclude='*' source/ destination/

Building Cross-Platform Desktop Apps with Electron.NET

This article provides a walk-through for developing and deploying an application with Electron.NET. Create an ASP. NET Core Web Application For this exercise, I'm using Visual Studio Code. First, open a terminal window and run the following commands to create a new project called ElectronMvcDemo . mkdir ElectronMvcDemo   cd ElectronMvcDemo   dotnet new webapp   code .   When prompted by Visual Studio Code, say Yes to load the required assets for the project. Press F5 to build and run the application, opening a browser on the default ASP. NET Core welcome page, hosted on localhost:5001. Close the page, return to VS Code and stop debugging. Electronize It! Now let's turn our boilerplate ASP. NET Core project into an Electron application. First, open the file ElectronMvcDemo.csproj and insert a package reference for the Electron.NET: <ItemGroup>     < PackageReference Include= "ElectronNET.API" Version= "9.31.2" /...

NodeJS - Npm - set global node_modules

Ever had the problem of 'XXXXX'( 'yarn' )  is not recognized as an internal or external command ?! The solution is as follows: mkdir % PROGRAMDATA % \npm setx PATH "%PROGRAMDATA%\npm;%PATH%" / M npm config set prefix % PROGRAMDATA % \npm Explanation: Create a folder in a sensible location to hold the globals (Microsoft is adamant that you shouldn't write to ProgramFiles, so %PROGRAMDATA% seems like the next logical place. The directory needs to be on the path, so use  setx .. /M  to set the system path (under HKEY_LOCAL_MACHINE). This is what requires you to run this in a shell with administrator permissions. Tell  npm  to use this new path. (Note: folder isn't visible in %PATH% in this shell, so you must open a new window). npm config ls - l | grep prefix -> This is to list all node_modules configured ... 

Raspberry PI - Rotate screen

The defaults are as follows: display_rotate=0 #Normal display_rotate=1 #90 degrees display_rotate=2 #180 degrees NOTE: You can rotate both the image and touch interface 180º by entering lcd_rotate=2 instead display_rotate=3 #270 degrees display_rotate=0x10000 #horizontal flip display_rotate=0x20000 #vertical flip

Setup network on CentOS 7 minimal

Imagine
Step 1:   nmcli d Step 2:   nmtui choose your network interfaces and click “ Edit ” Choose “ Automatic ” in  IPv4 CONFIGURATION  and check  Automatically connect  check box and press OK and quit from Network manager. service network restart

Electron Angular Material Tutorial

Imagine
I have created a small project just to have a scaffolding of an Electron application here . run npm install in the directory after git clone (download) electron-forge start Enjoy 

Angular6 & Material Desgn Scaffolding

Recently I wanted to test out a Material Design application with Angular6 and found out that scaffolding out a new application is really a pain. Here is a nice enough Angukar3 And Material desing application on my git ... enjoy.

Lirc - tutorial fix - update

Imagine
I used for this project and it worked the Raspian: 2018-03-13-raspbian-stretch on a Raspberry pi model B. https://www.blogger.com/blogger.g?blogID=2535858889336926497#editor/target=post;postID=7898794725768409114;onPublishedMenu=allposts;onClosedMenu=allposts;postNum=1;src=postname

Links !

Matematica: https://www.cymath.com Coding game: https://www.codingame.com/start https://codefights.com/

Lirc - tutorial fix

Imagine
In order for the tutorial here to work with the raspberry pi minibian edition after step  4. Restart the LIRC function edit the /boot/config.txt and add this line: dtoverlay=lirc-rpi,gpio_in_pin=18 then reboot the raspberry pi and continue with the tutorial steps from  here . sudo apt-get update sudo apt-get upgrade  sudo apt-get install lirc -y follow tutorial here Lirc command list here:  https://www.ocinside.de/modding_en/linux_ir_irrecord_list/ sudo irrecord -f -d /dev/lirc0 ~/lirc-files/lircd.conf (do not forget here to put a nice name to the remote) Ex: irsend SEND_ONCE wpoolair KEY_POWER   Transform from row to hex ! irrecord -a /etc/lircd.conf Inspired by : https://gist.github.com/prasanthj/c15a5298eb682bde34961c322c95378b http://www.raspberrypiwiki.com/index.php/Raspberry_Pi_IR_Control_Expansion_Board#Introduction http://www.lirc.org/html/irrecord.html http://www.lirc.org/html/irsend.html

JAVA SETUP 2

Imagine
LINUX Toate fisierele de tip tar, tar.gz/bz etc se deschid apasand dublu click pe ele si apoi drag&drop sau apasand butonul extract 1. Install VirtualBox de aici   pe parcursul instalarii o sa ceara sa accepti si sa ai incredere in Oracle ... bifeaza da si ok. 2. Creaza o masina virtuala Linux pe 64 de biti 3. Pasii din poze create an existing hard disk now dinamically allocated ultimul pas este sa adaugam imaginea cu linux mint pe care o descarcam de aici Acum pornim masina virtuala de la butonul START 4. Instalare linux mint - pe desktopul masinii virtuale exista un shortcut cu instalarea lui linux mint urmam pasii si instalam sistemul de operare la sfarsit atunci cand va fi cazul vom bifa pe parcurrsul instalarii enable 3rd party software download si vom defini un username/parola + autologhin ! enter la sfarsitul instalarii pentru ca masina virtuala sa reporneasca sistemul de operare 5. in interiorul sistemului instalat ...

JAVA SETUP

Imagine
Windows: 1. JAVA - JDK - download de aici  varianta pe 32/64 bites aferenta sistemului de operare (pentru a afla ce sistem de operare rulati Control Panel\System and Security\System direct in explorer) Din cauza ca java se adauga singura prin installer la %path% nu este nevoie sa intervenim 2. MAVEN -  download de aici  dezarhivati intr-un director convenabil deschideti command prompt (tasta windows + cmd + enter)  apoi in terminal copy paste(shift + insert) rundll32 sysdm.cpl,EditEnvironmentVariables ar trebui sa vedeti ceva asemanator in partea de sus adaugati o variabila denumita MVN impreuna cu calea completa Ex: C:\Users\Alex\Download\JAVA1\apache-maven-3.5.2 in partea de jos cautati variabila path si la sfarsitul sirului adaugati ;  dupa care %MVN%\bin in terminal (windows + comanda cmd) echo %path% si ar trebui sa vedeti la sfarsit calea completa catre directorul bin daca totul a decurs bine mvn -version ar trebui sa va intoarca v...

Java SpringBoot different properties file dev/test/production

Imagine
In order to make Spring java -jar have to take different application.properties at launch time based on whatever you specify {dev/test/production} simply do this: java -jar { MyAwesomneJar } --spring.config.location={ path }/ application.properties Where {path} is the dev, test or production folder where the  application.properties file is contained.

Replace default xWindow mouse theme

Imagine
1. Mouse theme here: https://github.com/keeferrourke/capitaine-cursors 2. How it looks here: https://store.kde.org/p/1148692/ 3. Tutorial here: https://www.xaprb.com/blog/2006/04/24/beautiful-x11-cursors/

Linux commands

Imagine
Useful commands: nohup grep adduser - /home/user useradd - low level userdel (userdel -r {userName}) groups ( cut -d: -f1 /etc/group - list all groups) groupadd useradd -G {groupName} {userName} LINK Links: https://goo.gl/K7c7Dy

Angular 2 - Read JSON file

Imagine
Angular 2 tutorial on how to read a JSON file that can be used as a app.config. Tutorial and steps here : https://github.com/alexandru360/Angular2ReadConfigFile

RaspberryPI useful links

Imagine
https://kr15h.github.io/RPi-Setup/ https://ibeblog.com/2014/04/23/minibian-first-steps/ https://minibianpi.wordpress.com/