written tutorial - PHP connect to Azure DB
11 Feb, 2020
This snippet shows you how to connect to Azure database for you to run some scripts for an example. In this example we use ODBC class not through PDO. You need to download two packages from your...
snippet -
11 Jan, 2020
This character appears mostly when you have copied code from somewhere. Some syntax highlighters are poorly made and when you copy code you get bad utf-8 symbols along with it. It doesn't show on...
snippet - PostgreSql return inserted row primary key
28 Nov, 2019
When you have primary keys generated by the database not by the application, then you might need it to be returned. In postgres you have to use RETURNING function in your sql query in order to have...
snippet - ArchLinux: downgrade packages
25 Nov, 2019
How to downgrade packages in ArchLinux. There is a nice package that automates this process for you. For me I ran into an issue with postgresql version update that broke the service. So I downloaded...
snippet - React Semantic UI: Simple drag and drop file field
23 Nov, 2019
An example of a simple dropzone using Semantic UI. Is achieved by using "react-dropzone", which does not provide theming.
snippet - React: Address Search using Google Places API
23 Nov, 2019
This snippet shows you how you can use google places api in react to create address autocomplete dropdown. There are other service providers than google, but google supports business names in...
snippet - React: reset state when you click current menu router
19 Nov, 2019
Use this snippet when you have created a menu using BrowserRouter from 'react-router-dom' and you need to reset the state when you click on the current menu item (same url path as you are currently...
snippet - React file upload using FormData and fetch.
13 Nov, 2019
You can create input fields or use libraries like react-dropzone in React very easily. You still need to get the files from the form and send them to backend for saving. This snippet is the upload...
snippet - Install yay on ArchLinux
28 Oct, 2019
How to install yay on ArchLinux. I used to use yaourt, since it is no longer developed I switched to yay.
snippet - Trim Array Whitespace in PHP
23 Oct, 2019
This snippet shows you how to trim whitespaces from each array value in PHP. Expects all array values to be strings.