Posts

Use google cloud log-sink to log incidents to your project management system

Image
Small team working on multi service product, With carrying more then one responsibilities. It's a big challenge to keep everything on track.  Most importantly, When it comes to incident reporting. We can not automate every thing but, at least we can automate incident reporting to our project management service eg Gitlab / GitHub / Slack.  ( Slack 😅 , for small team like us slack also work like project management tool. ) Google cloud log-sink Here comes google cloud log-sink handy to you.  We can direct all of your logs with severity level of  Error Crtitical Alert Emergency to a logs ink which log a incident on your project & issue tracking service ( For example Gitlab )  using cloud pub/sub topics. [ You can use firebase function for such pub/sub topics ]  Inclusion filter for error logs  severity='(ERROR OR CRITICAL OR ALERT OR EMERGENCY)' Next time when ever error log will be generated on your cloud logs. You will get an incident created on your gitlab.  So Don

Transpile your mithril jsx using babel's online transpiler

Image
You can transpile your JSX based mithril component to mithril component online with help of babeljs. Goto https://babeljs.io/repl Copy your JSX component over there. Select React and ES2015 in preset for compilation. You will be getting compiled code on the right side. If you notice this compiled code is for React, and not for the mithril . You have to go one step more , Replace all the React.createElement with m and you got the code for your mithril. Cheers!

Gitlab CI/CD for firebase project

Image
CI/CD stands for continues integration, continuous deployment. Normally, I am hosting my private projects on Gitlab. One of my project is implemented on google's firebase platform. It's using firebase functions, hosting, pub-sub and other google service heavily. Why I needed CI/CD ? 😅 Initially, there was hosting and very few firebase functions to handle. It was giving me option to deploy that particle service. Like, I want to deploy only hosting, I will say $ firebase deploy --only hosting Or, If I want to deploy only function $ firebase deploy --only functions Or more precisely, I want to deploy only a particular function. $ firebase deploy --only functions:[function-name] But, as the project started to grow, this approach started showing issues in integration. Local version were working fine while deployment were showing issues. Why ? . Because, the approach of deploying only services that has been touched was depending on the list of dep

Google blogger Ideas panel

Image
Google blogger Ideas  I opened by blogger today, and..   I got this.  Google blogger Ideas  A panel suggesting a topic on which I can write my next blog. It's fetching unanswered question from web according to your previous post and topics. It was something, I was really looking for, after all it takes time to finding subject on which to write next and still being in the same niche.  Awesome feature Blogger! 

Immutable.js with firebase

To store data we can use either object or we can use array in javascript. Both have their own advantage and disadvantage. Array : Array has advantage of maintaining order, but negative side is that If you want to update any element inside array you have to find the index of the element. May be via looping through the whole array if indexes are not predictable. Object : You can store element as object property. It's like key-value pair, So If you want to update any property (element) of object, you can update it easily using key. So, It's easy to update the elements in object, but object uses hash for property, So order is not guaranteed. Immutable.js with firebase Firebase provides live updates. Suppose you are having a program where you are listening for live updates on some last x elements, while retaining others for display only, but order of display matters.  You are listening for last x elements live, So you have to update the data of those elements when you receive upd

Ahmedabad Shopping festival

Image
Ahmedabad Shopping festival is solution created by  Tuzzin Infotech Pvt. Ltd . I worked as part of the development team My journey started as a part-time web developer. A MySQL database, Php for backend, VueJs and jQuery frontend, scss for css and I'm done. So easy! I was never thinking about scaling, rate limiting, timeout on those days, and normal site even does not need to care about such things unless they reaches that threshold. Luckily, I got chance to work on a product which was requiring all of this. It was the first time when I got exposure to real scalable application with spike in traffic, Ahmedabad Shopping festival 2019.   Brief Intro of Ahmedabad Shopping festival  Ahmedabad Shopping festival was first digitally managed shopping festival of India hosted in Ahmedabad, Gujarat. Every customer were getting rewards and coupons for chance to win prize on making shopping during shopping hours . Technical requirements Ahmedabad Shopping festival was consisting a web portal

Creating 2d games with golang and gontuz/prototype

Image
Golang was created as server language. But with the time and curiosity of people, golang has covered GUI application and game development as well. I am sharing here one of the available golang library, on top of which you can create 2d games. Its gonutz/prototype . Sample video Gonutz/prototype is very small and easy to learn library. It's cross-platform , that means the game your are creating in one platform will be able to run on other platforms without any change in code ( in normal case ).  This package currently supports windows , mac and linux. gonutz/prototype features Support for keyboard input Support for mouse input Support for 2d drawing Support for image and sprite-sheets Support for sound  Want to learn more about this package.  Follow my youtube video playlist "2d game development in golang" Video tutorial playlist:   https://www.youtube.com/playlist?list=PLub5C2vM5SjJIF0f561mAON7nFG2nKHD9