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

Agent Orchestration with VS Code and GitHub Copilot (Local Agents Only)

Agent Orchestration with VS Code and GitHub Copilot (Local Agents Only) Agent orchestration is becoming a key pattern in AI-assisted development. Instead of relying on a single assistant, developers can coordinate multiple specialized agents that collaborate to complete complex workflows. This article focuses strictly on local agents within GitHub Copilot in Visual Studio Code. It does not cover background agents or cloud agents. Scope of this article: Local agent capabilities in VS Code Agent handoff for orchestration Use of skills Reference implementation Focus on Local Agents Local agents operate entirely within the VS Code environment. Characteristics Execute inside the editor session Provide fast, interactive responses Work with local files and context No dependency on external execution pipelines Why Local Agents Immediate feedback loop Better developer control Ideal for iterative workflows Lower complexity compared to distributed systems Key idea: Local agents are sufficient to ...

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...