Skip to main content

Posts

GUI programming with golang

I am using the  andlabs/ui  library for GUI with golang.  It's quite easy to setup on the mac and Linux.  Video Guide But was not that much straightforward to setup on windows.  It required the  MinGW-w64 [ download from here ] . Make sure you are using the latest version of the MinGW-w64.   Select the appropriate architecture during the installation. Select architecture After installation of the MinGW set to add the path to the bin folder of the MinGW in the PATH variable. Set environment variable Copy the code from the getting started to your favourite editor package main import ( "github.com/andlabs/ui" ) func main() { err := ui.Main( func () { input := ui.NewEntry() button := ui.NewButton( "Click" ) greeting := ui.NewLabel( "" ) box := ui.NewVerticalBox() box.Append(ui.NewLabel( "Label" ), false ) box.Append(input, fals...

Apache : setup basic auth with apache in windows

Authentication is any process by which you verify that someone is who they claim they are. Authorization is any process by which someone is allowed to be where they want to go or to have information that they want to have. I will show here how to set up basic auth on the apache with windows. Pre-requests  Windows VPS Apache server ( That's it ) ( In windows it might be difficult to setup the Apache alone. So instead use something ling xampp , wamp or laragon .) RestClient (  I personally use the postman , but you can use your preferable client)  Windows VPS provider Steps  Enable the necessary modules in the Apache Create the password file Set the auth directives in the virtual host file. Verify basic auth. Enable the  necessary   modules  in the Apache Open the httpd.conf file in the apache's conf folder. httpd.conf file Enable the necessary modules to make the basic auth workin...

setup hyperledger fabric on windows 10

What is the Hyperledger fabric? Hyperledger Fabric  is a business blockchain framework hosted by the Linux Foundation intended as a foundation for developing blockchain applications or solutions with a modular architecture.  Hyperledger Fabric  allows components such as consensus and membership services to be plug-and-play. ( From Google Search Result ) Though documents say that hyper ledger fabric works on the windows, I can't find it running in well. I tried hard to run it but failed. But I found another way to run the hyper ledger on windows with Linux subsystem which has been officially available in windows 10. (Video Guide ) Requirement windows 10 Pro Docker CE PowerShell Nodejs Go 1.9 Basic Setup ( Step - 1 ) The first step to set up the hyperedge fabric on windows is to enable the Linux subsystem 1. Enable the Linux subsystem on your windows Enable Linux SubSystem 2. Install your favourite Linux subs...

Forward Proxy Using Apache

There are many scenarios where we need some kind of proxy. We will consider one scenario from all where we need to use the forward proxy. Case : Suppose there is a service which is available for certain IP/ IPs only (These are mostly secured services). In this case, you have to forward the service requests through that specific.  Take an example : Entities playing role, Hosting App On Google App Engine ( Dynamic IP) White Listed Server ( X.X.X.X ) Resource Server ( Y.Y.Y.Y ) Here  Resource    Server ( Y.Y.Y.Y ) will just respond to the request come from the White Listed IP  Server   ( X.X.X.X ). So if we want to request   Resource   Server (Y.Y.Y.Y) we have to send it to the way Server feel like they have come from White Listed Server IP (X.X.X.X). Here Proxy server comes in the play. Proxy server takes the request and forwards it as they are initiated by itself. So what we have to do is we have to put a proxy ser...

word count tool | wordcounter

I have to write a post for Alibaba cloud platform. I come to know that the post has to be 1300-1500 word long. So I write a post and that searched for a word counter tool.  In the search result, i found two site wordcounter.net wordcounter.io wordcounter . net wordcounter.net is the best site I found. It gives more details than just count of the word.  It gives the information of  characters words sentence  p aragraphs  word density have been written.  In additions, it also provides information like, Reading level Reading time speaking time wordcounter.net

datastore remove index

Cloud Datastore imposes limits on the number and overall size of index entries that can be associated with a single entity. These limits are large, and most applications are not affected. However, there are circumstances in which you might encounter the limits. Types of Datastore index Datastore composite indices Built-in indexes By default, Cloud Datastore automatically predefines an index for each property of each entity kind. These single property indexes are suitable for simple types of queries. Composite indexes Composite indexes index multiple property values per indexed entity. Composite indexes support complex queries and are defined in an index configuration file (index.yaml). Cost Counting for Datastore write In the current pricing model, inserting a new entity costs 2 write operations for the entity + 2 write operations per index. here index may be the composite index or built-in index ( single property index). You can remove ...

Host secured laravel 5.x appliaction on ubuntu 16.04 vps with apache

Aim   The aim of this tutorial is to show how to migrate the local laravel 5.x project to the Ubuntu 16.04 vps. We will see how to setup the vps for hosting from scratch. We also see the ways you can copy your laravel project to the vps and at last we will see how to secure your project with ssl using the lets encrypt. we will also add a cron job to auto update the ssl certificate.   Prerequisites   To follow this guide along you will require this  Ubuntu vps with 16.04  laravel  project you want to host ssh client For windows you can use putty For Mac you can use terminal sftp client For windows you can use winscp For Mac you can use cyberduck Git Remote Git repository ( optional ) Steps Now after gathering the required elements you can follow these steps to host your laravel 5.x project. Prepare the vps for the web hosting Install Php Install Mysql  Install Apache Install Git Copy and setup the loc...