A few years ago I have written a post on “How to create custom endpoint in WooCommerce API“. That was I think for v3 of older WooCommerce. After that, I did not get much time to work on WooCommerce products. But since then I was getting some queries on how to achieve the same forcontinue reading
Karthik Archives
Boto3 Single Session across the project
How to create a single boto3 session and use it across a python project? Here is the solution: Create session.py Paste the following code: import boto3 import os class Session: session = None def __init__(self): self.get_session() @classmethod def get_session(cls): if cls.session is None: cls.session = cls.start_session() return cls.session @staticmethod def start_session(): if ‘AWS_ROLE_ACCESS_KEY’ in os.environ:continue reading
Fetch Single Github File in Python
As I mentioned in the earlier post, I was recently working on a private project. We had to fetch a single GitHub file from a private Github repository without hardcoding the token or setting it as an environment variable. I could not easily find a ready solution. So prepared one. I am posting the solutioncontinue reading
Best Blogging Tools you will ever need
This is a comprehensive list of Tools and services that I use to create and maintain a blogging site. Are you looking to start a blogging website or looking for the tools required to improve your user experience or to improve SEO score? You have come to the right place. Keep reading to better understandcontinue reading
Recursive merge dictionaries – Python
I recently worked on a python project and noticed a situation where I needed two dictionaries to be merged recursively. There were some easy and simple solutions, but they would not have expected results or the dictionaries were not merged recursively or merged dicts would not properly override values. So I thought to write onecontinue reading
Create Amazon Alexa custom skill to interact with your PC
I have been developing custom Alexa skill lately and wanted to tell you how fun and easy it is to build an Alexa custom skill from scratch. Why build a custom skill? Amazon echo and echo dots are smart speaker devices developed by amazon.com and released at the end of 2014 to end-users. These devicescontinue reading
Why Firebase Admin – Development Reasons
This post is about the firebase management tool we recently developed at Codefoxes – Firebase Admin. I will try to explain why we developed it and the uses of the tool. Firebase Admin in Realtime Firebase is a modern NoSQL database system that handles data in realtime. The best thing about firebase is that itcontinue reading
Laravel Write Logs to Custom Files
When you create a worker application or any large application in Laravel you might want to keep track of logs. It might be necessary to save logs to different files to keep things clean. But by default the Laravel Log System doesn’t provide this feature. We can save to different files based on date, butcontinue reading
Drupal Save Profile Image Programmatically
When we use the Profile 2 module and need to save the profile image field (existing), we can use profile2 functions and achieve the task. Note down the Field needs to be updated. Load the profile. Add Image field to the loaded profile object Save the profile. function save_image_profile2($profile_id, $image_id){ // Load the profile objectcontinue reading
WooCommerce API Custom Endpoint – Legacy
Deprecated. Please refer How to create WooCommerce API V3 Custom Endpoint here. WooCommerce is great. But when it comes to API, it requires a little work to do some modifications. Let us take an example of custom endpoints. To make your own woocommerce api endpoint to return custom content, follow this tutorial. Create your owncontinue reading