Skip to main content

Posts

Three ways to use user defined vscode snippets

What are code snippets? Code snippets are templates that make entering repeated code patterns, such as loops or conditional statements,  easier. Types of snippets Built-in snippets   Vscode has built-in snippets for number of languages like PHP, Javascript, Typescript etc . Snippets available on market place   There custom snippets averrable on marketplace for specific frameworks / languages and platforms as well. For example snippets for VUE, Laravel etc. User defined snippets  You can defined your own snippets, It's called user defined snippets. You can create snippets according to your need using the snippet templates.
Recent posts

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

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't wait

Transpile your mithril jsx using babel's online transpiler

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

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.

Google blogger Ideas panel

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

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