Showing posts with label Github. Show all posts
Recently, I was trying to move some files, mostly .java's and.sql's, from one maven module into another one. We were just trying to merge two modules into one module, because of we thought that keeping two modules with pretty the same functionality is odd.
The main point around this movement was to preserve the history of changes made to those files in the past. Everything was fine until we tried to deploy the application on the server. Of course, I forgot to mention that we were using Flyway as a database migration tool. Unexpectedly, one of the file's checksum was not the same as the checksum saved in the database for that SQL file (flyway_schema_history table). We were astonished because of the content of the file did not change at all... but Pull Request on BitBucket was saying that there is a difference. We checked the MD5 for that file before and after the move, it was the same, but for some reason the checksum detected by Flyway was different! To be honest, we spent a lot of time trying to understand why it's happening, and then I found this post made by Richard Tuin [1].
The solution was just to revert moving of those SQL files up to the previous location and try to create a file called .gitattributes. We defined over there just a single line which was disabling CRLF for that single file for which checksum was not the same as this one stored in flyway schema history table. After moving SQL files once again, using git mv [2] command and uploading results on BitBucket, everything was fine!
The content of .gitattributes for that single file should look as below :
fileName.sql -crlf
References :
[1] Richard Tuin - How to make git ignore different line endings
[2] Git mv
[3] Git attributes
Recently I was creating small distributed application called ClientBackend just for interview purpose. Solution consists of thee microservices :
- Client (received request from API Gateway and sends it to Backend)
- Backend (performs operation defined in request)
- Discovery (Spring Eureka)
- API Gateway (Spring Zuul)
- Java 8
- Spring Boot
- Hystrix
- Eureka
- Feign
- Zuul
- TypeOf
Today I have released on GitHub two repositories which contain one of my recent project called TrafficCity. It was developed on hackathon called BIHAPI (Business Intelligence Hackathon API) organized by Orange Poland.
Briefly describing what's it's about in this app - on the mobile app you can place your markers (waypoints) on Google Maps which describes your daily route to work/school. After that you can send those waypoints to server to further processing.
In Backend you can see what's routes are defined by users. Additionally you can upload OSM file which is strongly related with OpenStreetMap and after that you can see on particular area what's is the chance to appear traffic jam.
An application consists of Backend app written in Spring and mobile app written in Android. Application was mainly deployed on JBoss AS 7.1. Backend part is also using interfaces provided by Orange - SIM GeoLocalization API, SMS API, USSD API and by Warsaw City - Transport POI Maps.
Unfortunately, I think that application which is in alpha phase, probably would remain so. There a few things to do/fix on the Backend and Mobile part, but not at this moment. I hope that more appropriate time will come.
Below I allowed myself to post some screenshots from backend and mobile part of this application.
![]() |
Dashboard |
![]() |
Markers |
![]() |
OSM Upload |
![]() |
OSM Projects |
![]() |
HeatMap |
![]() |
Home |
![]() |
Settings |
![]() |
Transport Type |
![]() |
First marker |
![]() |
Multiple markers |
![]() |
Daily route |
![]() |
Settings |
Reference :
[1] GitHub TrafficCity Backend
[2] GitHub TrafficCity Android
[3] BIHAPI
I would like to present you some showcase of using PHP SDK to integrate with Facebook which was developed by Naitik Shah one of the Facebook employee. Appropriate reference to this very powerful SDK you can find in reference below.
So, I have created some small showcase which aims to show how to retrieve Facebook profile (not person, but some organisation or business) and print entries which was published on it's wall. Every entry is described by Name, Image (if was uploaded), Creation time, Title and Description as on screenshot below.
![]() |
FB Profile list of entries |
As you can see you can also set post range for FB Profile which posts are listed. Default FB Profile is set as 'Google'.
The project has been removed from github.
There is a also one additionally page which allows user to add and remove FB profiles. Once you are going to add new FB profile you should provide FB Profile name which should strictly defined it and FB Url name. You can get more information how to obtain this Url name through hovering the mouse over the words "(Show hint)". All FB profiles are stored in SQLite database. More information about it's structure you can find in fb_db.sql file.
![]() |
FB Profile Manager |
Reference: [1] PHP SDK for Facebook [2] CSS Globe - Easiest Tooltip and Image Preview Using jQuery
I would like to introduce a small script written in Python which allows to automate mount unmounted specified directory. Script can be placed in crontab. User should define command, password which is required for this command, path to directory which should be mounted and expected text as usual after executing specified command. You can also make further adjustments of script if your command does not need for instance password.
Script uses modules :
- pexpect
- time
- datetime
- os
I would like to introduce my new repo on GitHub which is called MachineInfo. More information after clicking the link below :
https://pastebin.com/aefQhyTj
I just wanted to announce that I created my own github, where I am going to store my projects. So, stay tuned ;)