Coding is Love https://codingislove.com/ Wed, 22 Oct 2025 10:04:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://codingislove.com/wp-content/uploads/2015/12/codinglovenew-150x150.png Coding is Love https://codingislove.com/ 32 32 How this Bengaluru Startup Deva AI is Reimagining Spiritual Wellness https://codingislove.com/bengaluru-startup-deva-ai/ https://codingislove.com/bengaluru-startup-deva-ai/#respond Wed, 22 Oct 2025 09:58:37 +0000 https://codingislove.com/?p=4462 In a world where 89% of Indians report experiencing stress, yet seeking help remains deeply stigmatized, a Bengaluru-based product studio has found an unexpected solution: combining artificial intelligence with India's rich spiritual heritage.

Meet Deva AI—a personal spiritual companion app that's quietly revolutionizing how millions of Indians engage with spirituality, mental wellness, and daily guidance.

The post How this Bengaluru Startup Deva AI is Reimagining Spiritual Wellness appeared first on Coding is Love.

]]>
How Deva AI is bridging ancient wisdom with modern technology to address India’s silent mental health crisis


In a world where 89% of Indians report experiencing stress, yet seeking help remains deeply stigmatized, a Bengaluru-based product studio has found an unexpected solution: combining artificial intelligence with India’s rich spiritual heritage.

Meet Deva AI—a personal spiritual companion app that’s quietly revolutionizing how millions of Indians engage with spirituality, mental wellness, and daily guidance.

The Problem: A Generation Caught Between Tradition and Modernity

Young professionals like Anjali, a 28-year-old marketing manager, wake up to mounting work pressure, relationship anxieties, and the overwhelming question: “How do I navigate this modern chaos while staying true to my roots?”

Students like Rohan face career uncertainty and societal expectations that leave them feeling directionless. Meanwhile, seekers like Mr. Sharma find traditional religious practices either inaccessible in their busy lives or unable to provide answers for their specific, contemporary problems.

The core issue isn’t a lack of spirituality—India remains one of the world’s most spiritual nations. It’s the delivery mechanism. How do you make ancient wisdom accessible, engaging, and relevant for someone scrolling through their phone at 11 PM, feeling lost?

Enter Deva: Your Pocket-Sized Spiritual Ecosystem

Developed by BloomSynth Product Studio, Deva AI isn’t just another meditation app. It’s a comprehensive spiritual platform that combines multiple engagement touchpoints:

1. Talk to God—Literally

At the heart of Deva is its breakthrough feature: AI-powered conversations with divine personas. Users can chat with Lord Ganesha for overcoming obstacles, seek Krishna’s wisdom for relationship guidance, or find Durga’s fierce empowerment when facing injustice.

Each deity persona is carefully crafted—Ganesha speaks with warmth and encouragement, Shiva offers transformative depth, and Krishna uses his characteristic playful wisdom. The AI is trained on scriptures and Puranic stories, ensuring authentic guidance rooted in tradition.

2. Daily Spiritual Rituals, Gamified

Deva transforms ancient practices into engaging daily habits:

  • Virtual Pooja: Interactive prayer experiences with drag-and-drop diyas and virtual bells
  • Guided Meditations: Professional audio sessions in authentic Indian voices
  • Bhagavad Gita Study: One shloka per day with translations in 6 languages and audio narration

3. The Karma Points System

Here’s where Deva’s genius truly shines. By gamifying spiritual practice, they’ve created a habit-forming loop that respects tradition while embracing modern engagement mechanics. Users earn Karma Points for daily activities, which can unlock deeper content—creating a rewarding journey of spiritual growth.

The insight? “Talking to God will always be free. We monetize devotion, not access.”

The Traction: Early Signs of Product-Market Fit

Since launch, Deva AI has achieved remarkable growth in less than three months:

  • 10,000+ downloads on the Google Play Store
  • 4.7-star average rating
  • Highly engaged power users who return daily for meditation, pooja, and divine conversations
  • Qualitative feedback showing users feel genuine connection and find real value

Perhaps most tellingly, these numbers came with minimal marketing—suggesting strong word-of-mouth and organic discovery. Reaching 10K downloads in under 90 days signals genuine product-market fit in a crowded app marketplace.

The Business Model: Freemium 2.0

Unlike subscription-heavy wellness apps, Deva uses a gamified monetization strategy that respects the user’s spiritual journey:

  • Free Path: Earn Karma Points through daily activities to unlock content
  • Paid Path: In-app purchases to accelerate progress without waiting

The model avoids subscription barriers while converting passionate users into paying customers—and early signs suggest it’s working.

Why Deva Could Be a Category Winner

1. First-Mover Advantage: Deva is pioneering “Gamified Spiritual Wellness”—a category that didn’t exist before.

2. Deep Cultural Fit: By respecting India’s spiritual diversity (10 deity personas, 6 languages, authentic scriptural grounding), Deva feels like our app, not a Western import.

3. The Engagement Moat: Competitors offer content. Deva offers experiences. The daily ritual loop creates genuine habit formation.

4. Expanding Addressable Market: With 250+ million digitally-savvy Indians aged 18-60, and increasing smartphone penetration in Tier 2/3 cities, the TAM is massive and growing.

The Bottom Line

In a market where stress is pervasive, traditional therapy is stigmatized, and spiritual guidance feels inaccessible, Deva AI has found a white space that’s both massive and deeply human.

They’re not just building an app—they’re creating a movement where technology doesn’t replace tradition but rather makes it radically more accessible.

For investors looking at India’s next wave of consumer tech, this is worth watching. For users seeking guidance, the Deva app is worth downloading.

Sometimes the most innovative solutions come from honoring what’s ancient while embracing what’s possible.


Deva AI is available on the Google Play Store. To learn more about BloomSynth Product Studio, visit bloomsynth.com.

The post How this Bengaluru Startup Deva AI is Reimagining Spiritual Wellness appeared first on Coding is Love.

]]>
https://codingislove.com/bengaluru-startup-deva-ai/feed/ 0 4462
Ultimate Guide: Build A Mobile E-commerce App With React Native And Medusa.js https://codingislove.com/medusa-mobile-react-native/ https://codingislove.com/medusa-mobile-react-native/#respond Sat, 15 Feb 2025 16:13:47 +0000 https://codingislove.com/?p=4443 Looking to build a mobile app with Medusa.js? This comprehensive guide walks you through creating a React Native Medusa mobile app from scratch. Whether you’re starting a new project…

The post Ultimate Guide: Build A Mobile E-commerce App With React Native And Medusa.js appeared first on Coding is Love.

]]>
Looking to build a mobile app with Medusa.js? This comprehensive guide walks you through creating a React Native Medusa mobile app from scratch. Whether you’re starting a new project or looking for a React Native starter Medusa template, you’ll learn how to build a production-ready mobile e-commerce solution.

What is Medusa?

Medusa is an open-source headless commerce engine that enables developers to create unique and scalable e-commerce experiences. Unlike traditional e-commerce platforms, Medusa offers:

  • Headless Architecture: Complete freedom in frontend implementation
  • Extensible Core: Plugin system for custom functionality
  • Developer-First: Built with TypeScript and modern development practices
  • Multi-Region Support: Built-in multi-currency support based on region
  • Order Management: Comprehensive order lifecycle handling
  • Inventory Management: Built-in inventory and variant management
  • Modular architecture

Why React Native?

React Native is a framework for building native mobile applications using React:

  • Native Performance: Direct access to native platform capabilities
  • Code Reusability: Share logic between iOS and Android
  • Large Ecosystem: Extensive library of third-party packages
  • Hot Reload: Fast development with instant feedback
  • Strong Community: Active development and community support

Using React Native with Medusa

Combining React Native and Medusa.js creates powerful mobile e-commerce possibilities:

  • Native Mobile Experience: Build a React Native Medusa app with native UI components
  • Mobile-First Features: Leverage device capabilities like push notifications
  • Offline Support: Implement AsyncStorage for cart and user data
  • Performance Optimization: Native rendering for smooth product browsing
  • Cross-platform support: Build an Android and iOS e-commerce mobile app using a single code base

Introducing Medusa Mobile

Medusa Mobile is a complete React Native Medusa starter. It is not just a starter, it comes with 90% of the functionality that you need for a production-ready app.

Features of Medusa Mobile:

  • 🛍️ Product browsing with infinite scroll
  • 👤 User authentication and profile management
  • 🔍 Categories and collections
  • 🛒 Cart management
  • 🏃‍♂️ Guest checkout
  • 📦 Order tracking
  • 🎨 Multiple themes with dark mode

Setting up Medusa Backend

Before running the mobile app, you need a Medusa backend. Set it up in a few steps by following the official docs – Install Medusa backend application

Setting up Medusa Mobile

Now let’s set up the React Native Medusa mobile app

📋 Prerequisites

Before you begin, ensure you have:

Step 1: Environment Setup

  1. Clone the repository:
git clone [email protected]:bloomsynth/medusa-mobile-react-native.git medusa-mobile
cd medusa-mobile
  1. Install dependencies:
npm install
  1. Configure environment variables:
cp .env.template .env

Edit .env with your Medusa backend URL and publishable API key.

NOTE: Update the MEDUSA_BACKEND_URL in your .env file. If you set the URL as localhost, then the Android emulator will not be able to connect to the server. Use your local IP address instead. example: http://192.168.1.100:9000 Run ipconfig to get your local IP address.

Step 2: Start Metro Server

npm start

Step 3: Run the Application

For Android:

npm run android

For iOS: Install dependencies for iOS:

npx pod-install ios

Run the application:

npm run ios

📱 Expo Usage

This project uses React Native CLI to ensure maximum flexibility for all developers. However, Expo users are more than welcome! You can easily add Expo support with a single command.

Learn more about migrating to Expo CLI

📁 Project Structure

app/
├── screens/       # Screen components
├── components/    # Reusable UI components
├── data/          # Data context providers
├── styles/        # Theme and style utilities
├── utils/         # Helper functions
└── api/           # API client configuration

📖 Developer Guide

Here’s the documentation for managing the core functionality of the app.

🛒 Cart Management

The cart functionality is provided through the useCart hook, which gives you access to cart operations and state.

Basic Usage

import { useCart } from '@data/cart-context';

function MyComponent() {
  const { 
    cart,                // Current cart state
    addToCart,          // Add items to cart
    updateLineItem,     // Update item quantity
    removeLineItem,     // Remove item from cart
    applyPromoCode,     // Apply discount code
    removePromoCode,    // Remove discount code
    setShippingMethod   // Set shipping option
  } = useCart();
}

Working with Cart Items

  1. Add a product to the cart:
const { addToCart } = useCart();

// Quantity is required when adding items
await addToCart(variantId, 1); // Add one item
await addToCart(variantId, 3); // Add three items
  1. Update item quantity:
const { updateLineItem } = useCart();

// Update to specific quantity
await updateLineItem(lineItemId, 2);

// Remove item by setting quantity to 0
await updateLineItem(lineItemId, 0);

Managing Promotions

const { applyPromoCode, removePromoCode } = useCart();

// Apply a promotion code
const success = await applyPromoCode('SUMMER2024');

// Remove a promotion code
await removePromoCode('SUMMER2024');

Shipping Methods

const { setShippingMethod } = useCart();

// Set shipping method
await setShippingMethod(shippingMethodId);

Accessing Cart Data

const { cart } = useCart();

// Get cart items
const items = cart.items;

// Get cart totals
const {
  subtotal,
  tax_total,
  shipping_total,
  discount_total,
  total
} = cart;

// Check applied discounts
const appliedPromotions = cart.promotions;

// Get selected shipping method
const currentShipping = cart.shipping_methods?.[0];

Cart Lifecycle

The cart system handles various states and transitions:

  1. Cart Creation:
const { cart } = useCart();

// Cart is automatically created when needed
// You don't need to explicitly create a cart
  1. Guest to Customer Cart Transfer:
// When a guest user logs in, their existing cart is 
// automatically associated with their customer account
// This is handled by the CartProvider and CustomerProvider

import { useCustomer } from '@data/customer-context';
import { useCart } from '@data/cart-context';

function CheckoutFlow() {
  const { customer } = useCustomer();
  const { cart } = useCart();
  
  // Cart remains the same, only the customer_id is updated
}
  1. Cart update on region change:
import { useRegion } from '@data/region-context';
import { useCart } from '@data/cart-context';

function MyComponent() {
  const { region } = useRegion();
  const { cart } = useCart();

  // Cart automatically updates when region changes
  // Product prices will be updated based on the region
  console.log(cart.region_id); // Current region ID
  console.log(cart.currency_code); // Region's currency
}

🌍 Region Management

The region functionality is provided through the useRegion hook, which handles region selection and persistence.

Basic Usage

import { useRegion } from '@data/region-context';

function MyComponent() {
  const {
    region,             // Current selected region
    setRegion,          // Update region state
  } = useRegion();
}

Working with Regions

  1. Access current region:
const { region } = useRegion();

// Get region details (if region is loaded)
const {
  id,
  name,
  currency_code,
  countries
} = region || {};
  1. Change region:
const { setRegion } = useRegion();

// Fetch region data first
const { region: newRegion } = await apiClient.store.region.retrieve(regionId);

// Update region
setRegion(newRegion);
// This will:
// - Persist region selection
// - Update cart region automatically
// - Trigger price recalculations

Region Selection UI

The app provides a built-in region selector modal:

import { useNavigation } from '@react-navigation/native';

function MyComponent() {
  const navigation = useNavigation();
  
  // Open region selector modal
  const openRegionSelect = () => {
    navigation.navigate('RegionSelect');
  };
}

Working with Countries

The app provides a dedicated hook for accessing region countries:

import { useCountries } from '@data/region-context';

function AddressForm() {
  const countries = useCountries();
  
  // Format countries for picker/selector
  const countryOptions = countries?.map(country => ({
    label: country.display_name,
    value: country.iso_2
  }));
}

Region Persistence

Region selection is automatically persisted using AsyncStorage:

  • On first load, defaults to the first available region
  • On subsequent loads, restores the previously selected region
  • Region ID is stored under the ‘region_id’ key

👤 Customer Management

The customer functionality is provided through the useCustomer hook, which handles authentication and customer data management.

Basic Usage

import { useCustomer } from '@data/customer-context';

function MyComponent() {
  const {
    customer,           // Current customer data
    login,             // Login with email/password
    logout,            // Logout current customer
    register,          // Register new customer
    refreshCustomer,   // Refresh customer data
    updateCustomer     // Update customer details
  } = useCustomer();
}

Authentication

  1. Login:
const { login } = useCustomer();

try {
  await login(email, password);
  // On successful login:
  // - JWT token is stored in AsyncStorage
  // - Customer data is fetched
  // - Cart is associated with customer
} catch (error) {
  // Handle login error
}
  1. Register new customer:
const { register } = useCustomer();

try {
  await register(
    email,
    password,
    firstName,
    lastName
  );
  // Registration automatically logs in the customer
} catch (error) {
  // Handle registration error
}
  1. Logout:
const { logout } = useCustomer();

await logout();
// This will:
// - Clear the stored JWT token
// - Reset customer data
// - Reset cart

Managing Customer Data

  1. Access customer information:
import { useLoggedIn } from '@data/hooks';

function MyComponent() {
  const { customer } = useCustomer();
  const isLoggedIn = useLoggedIn();

  // Access customer details
  const {
    email,
    first_name,
    last_name,
    phone,
    billing_address,
    shipping_addresses
  } = customer || {};
}
  1. Update customer details:
const { updateCustomer } = useCustomer();

// Update customer information
await updateCustomer({
  first_name: "John",
  last_name: "Doe",
  phone: "+1234567890"
});
  1. Refresh customer data:
const { refreshCustomer } = useCustomer();

// Fetch latest customer data from server
await refreshCustomer();

Session Management

The customer session is automatically managed:

  • JWT token is stored in AsyncStorage under ‘auth_token’
  • Session is restored on app launch
  • Token is automatically attached to API requests
  • Session is cleared on logout

🎨 Theme Management

The app includes a flexible theming system with built-in light/dark mode support and multiple color schemes.

Basic Usage

import { useColors, useTheme, useThemeName, useColorScheme } from '@styles/hooks';

function MyComponent() {
  const colors = useColors();          // Get current theme colors
  const themeName = useThemeName();    // Get current theme name
  const { colorScheme } = useColorScheme(); // Get 'light' or 'dark'

  // Access theme colors
  const {
    primary,            // Brand/accent color
    background,         // Main background
    backgroundSecondary,// Secondary/card background
    content,           // Main text color
    contentSecondary   // Secondary text color
  } = colors;
}

Setting Default Theme

// In app.tsx, set your preferred theme name in ThemeProvider
<ThemeProvider name="default">
  {/* ... other providers */}
</ThemeProvider>

Available theme names:

  • “default” (Purple accent)
  • “vintage” (Warm red accent)
  • “funky” (Teal accent)
  • “eco” (Green accent)

Changing Themes

import { useTheme } from '@styles/hooks';

function ThemeSwitcher() {
  const { setThemeName } = useTheme();
  
  // Switch to a different theme
  const switchTheme = (name: string) => {
    setThemeName(name); // 'default' | 'vintage' | 'funky' | 'eco'
  };
}

System Dark Mode

The theme system automatically responds to system dark mode changes through NativeWind’s useColorScheme hook. Each theme includes both light and dark variants that are automatically applied based on the system setting.

Styling Components

The app uses NativeWind (TailwindCSS) for styling. Theme colors are available as Tailwind classes:

function ThemedButton() {
  return (
    <TouchableOpacity className="bg-primary"> // Theme primary color
      <Text className="text-content font-bold"> // Theme content color
        Click Me
      </Text>
    </TouchableOpacity>
  );
}

🪝 Useful Hooks

The app provides additional hooks for common functionality:

import { 
  useProductQuantity,
  useVariantQuantity,
  useCartQuantity,
  useCurrentCheckoutStep,
  useActivePaymentSession,
  useLoggedIn,
  useCountries
} from '@data/hooks';

// Get quantity of a specific product in cart
const quantity = useProductQuantity(productId);

// Get quantity of a specific variant in cart
const variantQuantity = useVariantQuantity(variantId);

// Get total number of items in cart
const cartQuantity = useCartQuantity();

// Get current checkout step
const checkoutStep = useCurrentCheckoutStep(); 
// Returns: 'address' | 'delivery' | 'payment' | 'review'

// Get active payment session in checkout
const paymentSession = useActivePaymentSession();

// Check if user is logged in
const isLoggedIn = useLoggedIn();

// Get formatted list of countries for current region
const countries = useCountries();
// Returns: Array<{ label: string, value: string }>

Read the detailed documentation in the official repo of Medusa Mobile

Next Steps

Your Medusa mobile app is now running! Here’s what to do next:

Customize Your App

  • Select one theme from the built-in themes, customize one of them, or build a new theme config to match your app requirement.
  • Modify UI as needed. You have access to full source code andthe ability to change anything.
  • Add custom features using Medusa’s API

Production Release

Follow React Native’s Release Guide for Android and iOS

Publishing to Google Play Store

Publishing to iOS App Store

Wrapping up

Start building your mobile commerce experience with React Native and Medusa today! Check out the GitHub repository of Medusa Mobile for the complete source code.

The post Ultimate Guide: Build A Mobile E-commerce App With React Native And Medusa.js appeared first on Coding is Love.

]]>
https://codingislove.com/medusa-mobile-react-native/feed/ 0 4443
Flutter lookup failed in @fields error (solved) https://codingislove.com/flutter-lookup-failed-in-fields-error-solved/ https://codingislove.com/flutter-lookup-failed-in-fields-error-solved/#respond Fri, 14 Jul 2023 11:09:53 +0000 https://codingislove.com/?p=4422 Did you get a red screen error with the description lookup failed in @fields somefile.dart? Here’s how to solve it. This error happens if you…

The post Flutter lookup failed in @fields error (solved) appeared first on Coding is Love.

]]>
Did you get a red screen error with the description lookup failed in @fields somefile.dart? Here’s how to solve it.

This error happens if you have recently added any properties to a widget and try to render the widget with a hot reload.

It is probably because Flutter’s Hot Reload did not refresh the code properly. Just do a full restart by pressing Ctrl + Shift + F5 or by clicking on the restart button in VScode. The issue should be gone now!

The post Flutter lookup failed in @fields error (solved) appeared first on Coding is Love.

]]>
https://codingislove.com/flutter-lookup-failed-in-fields-error-solved/feed/ 0 4422
Free open source alternative to Notion along with AI https://codingislove.com/free-open-source-alternative-to-notion-along-with-ai/ https://codingislove.com/free-open-source-alternative-to-notion-along-with-ai/#respond Thu, 13 Jul 2023 16:54:05 +0000 https://codingislove.com/?p=4413 Are you looking for an open-source alternative to Notion? Notion is a freemium productivity and note-taking web application developed by Notion Labs Inc. Here’s a…

The post Free open source alternative to Notion along with AI appeared first on Coding is Love.

]]>
Are you looking for an open-source alternative to Notion? Notion is a freemium productivity and note-taking web application developed by Notion Labs Inc.

Here’s a free alternative to Notion along with AI

Introducing Novel

Novel is a Notion-style WYSIWYG editor with AI-powered autocompletion.

Here’s a demo video attached below

Deploy Your Own

You can deploy your own version of Novel to Vercel with one click:

Deploy to Vercel

Setting Up Locally

To set up Novel locally, you’ll need to clone the repository and set up the following environment variables:

  • OPENAI_API_KEY – your OpenAI API key (you can get one here)
  • BLOB_READ_WRITE_TOKEN – your Vercel Blob read/write token (currently still in beta)

If you’ve deployed this to Vercel, you can also use vc env pull to pull the environment variables from your Vercel project.

Tech Stack

Novel is built on the following stack:

Conclusion

Credits to @steventey for developing this amazing project!

The post Free open source alternative to Notion along with AI appeared first on Coding is Love.

]]>
https://codingislove.com/free-open-source-alternative-to-notion-along-with-ai/feed/ 0 4413
Threads API for developers for programmatic access https://codingislove.com/threads-developer-api/ https://codingislove.com/threads-developer-api/#respond Wed, 12 Jul 2023 13:16:06 +0000 https://codingislove.com/?p=4401 Threads, An Instagram app is all the rage now. Threads is an alternative to Twitter and everyone’s hoping on the new platform now. If you’re…

The post Threads API for developers for programmatic access appeared first on Coding is Love.

]]>
Threads, An Instagram app is all the rage now. Threads is an alternative to Twitter and everyone’s hoping on the new platform now. If you’re a developer and looking for Threads API then continue reading.

Threads API

Threads API

There is no official developer API for Threads yet but a developer reverse-engineered the Threads API requests and created an unofficial API client.

The API client is an unofficial, Reverse-Engineered Node.js/TypeScript client for Meta’s Threads.

📦 Installation

yarn add threads-api
# or with npm
npm install threads-api
# or with pnpm
pnpm install threads-api

// or in Deno 🦖
import ThreadsAPI from 'npm:threads-api';

const threadsAPI = new ThreadsAPI.ThreadsAPI({});

Threads API Usage

It is as simple as importing the API client and using the client’s methods. If you want to access public data then you can directly use the API but if you want to access private methods such as publishing a thread or following someone then you should initialize the API with username and password

Checkout the examples below:

How to fetch threads user profile from API

import APIClient from "threads-api";

const main = async () => {
  const threadsAPI = new APIClient.ThreadsAPI();

  const username = "codingislove";

  // 👤 Details for a specific user
  const userID = await threadsAPI.getUserIDfromUsername(username);
  if (!userID) {
    return;
  }
  const user = await threadsAPI.getUserProfile(username, userID);
  console.log(JSON.stringify(user));
};

main();

Response:

{
  "is_private": false,
  "profile_pic_url": "https://scontent.cdninstagram.com/v/t51.2885-19/358193075_291108399947602_86677529474390528_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent.cdninstagram.com&_nc_cat=110&_nc_ohc=qa3mujfMuOMAX_hdows&edm=APs17CUBAAAA&ccb=7-5&oh=00_AfBjrANoN_vgzct9EOFSe3NZACDpJijVQbwXnUsgUIkDuQ&oe=64B34485&_nc_sid=10d13b",
  "username": "codingislove",
  "hd_profile_pic_versions": null,
  "is_verified": false,
  "biography": "If you're a developer, you should follow this account 🤖",
  "biography_with_entities": null,
  "follower_count": 4,
  "profile_context_facepile_users": null,
  "bio_links": [{ "url": "https://codingislove.com/" }],
  "pk": "5635301639",
  "full_name": "Coding is Love",
  "id": null
}

✨ How to publish a thread using API

import APIClient from "threads-api";

const publishThread = async () => {
  const threadsAPI = new APIClient.ThreadsAPI({
    username: '_junhoyeo', // Your username
    password: 'PASSWORD', // Your password
  });

  await threadsAPI.publish({
    text: '🤖 Hello World',
  });
};

publishThread();

✨ Threads with Image

await threadsAPI.publish({
  text: '🤖 Threads with Image',
  image: 'https://github.com/junhoyeo/threads-api/raw/main/.github/cover.jpg',
});

✨ Threads with Link Attachment

await threadsAPI.publish({
  text: '🤖 Threads with Link Attachment',
  url: 'https://github.com/junhoyeo/threads-api',
});

✨ Reply to Other Threads

const parentURL = 'https://www.threads.net/t/CugF-EjhQ3r';
const parentPostID = await threadsAPI.getPostIDfromURL(parentURL); // or use `getPostIDfromThreadID`

await threadsAPI.publish({
  text: '🤖 Beep',
  link: 'https://github.com/junhoyeo/threads-api',
  parentPostID: parentPostID,
});

✨ Like/Unlike a Thread

const threadURL = 'https://www.threads.net/t/CugK35fh6u2';
const postIDToLike = await threadsAPI.getPostIDfromURL(threadURL); // or use `getPostIDfromThreadID`

// 💡 Uses current credentials
await threadsAPI.like(postIDToLike);
await threadsAPI.unlike(postIDToLike);

✨ Follow/Unfollow a User

const userIDToFollow = await threadsAPI.getUserIDfromUsername('junhoyeo');

// 💡 Uses current credentials
await threadsAPI.follow(userIDToFollow);
await threadsAPI.unfollow(userIDToFollow);

❤️‍🔥 Delete a Post

const postID = await threadsAPI.publish({
  text: '🤖 This message will self-destruct in 5 seconds.',
});

await new Promise((resolve) => setTimeout(resolve, 5_000));
await threadsAPI.delete(postID);

Supported features

  • ✅ Read public data
    •  ✅ Fetch UserID(314216) via username(zuck)
    •  ✅ Read User Profile Info
    •  ✅ Read the list of User Threads
    •  ✅ Read the list of User Replies
    •  ✅ Fetch PostID(3140957200974444958) via PostID(CuW6-7KyXme) or PostURL(https://www.threads.net/t/CuW6-7KyXme)
    •  ✅ Read Threads via PostID
    •  ✅ Read Likers in Thread via PostID
    •  🚧 Read User Followers
    •  🚧 Read User Followings
  •  🚧 Read private data
  • ✅ Write data (i.e. write automated Threads)
    • ✅ Create a new Thread with text
      •  ✅ Make link previews to get shown
    •  ✅ Create a new Thread with a single image
    •  🚧 Create a new Thread with multiple images
    •  ✅ Reply to existing Thread
    •  ✅ Delete Thread
  • ✅ Friendships
    •  ✅ Follow User
    •  ✅ Unfollow User
  • ✅ Interactions
    •  ✅ Like Thread
    •  ✅ Unlike Thread

Conclusion

Checkout the official repo for more options and updates

Also, read How to Send SMS from API or Backend 📲

The post Threads API for developers for programmatic access appeared first on Coding is Love.

]]>
https://codingislove.com/threads-developer-api/feed/ 0 4401
How to replace face in a video for free? https://codingislove.com/replace-face-in-video-free/ https://codingislove.com/replace-face-in-video-free/#comments Tue, 11 Jul 2023 18:06:41 +0000 https://codingislove.com/?p=4369 Do you want to replace a face with a deep fake? You’ve probably come across a few extensions for editing software and some online tools…

The post How to replace face in a video for free? appeared first on Coding is Love.

]]>
Do you want to replace a face with a deep fake? You’ve probably come across a few extensions for editing software and some online tools but none of them are free. Here’s a free tool that you can use offline on your PC to replace a face with a deep fake.

replace face in video

Deep Face Live Free

Deep Face Live is a free open-source software that you can use to swap faces in a video or swap faces in a real-time stream like video calls, webcam recording, etc.

Let’s see how to swap faces in a video for free using this software

Pre-requisites

You’ll need a PC with a decent graphic card and RAM for this software to work.

Installation

Step 1: Download

Download DeepFaceLive from here

Download deep face live

Download the latest NVIDIA build if you have a NVIDIA graphic card or else download the DirectX12 build.

Step 2: Set total virtual memory to 32 GB or more.

Press Windows + R on your keyboard and type sysdm.cpl

run command

Click on the advanced tab on the top and click on settings under the performance tab

performance tab

Select the Advanced tab again and click on “Change” in the virtual memory section

advanced tab

Select C drive > Select custom size > Enter 16384 in Initial size > Enter 32768 in Maximum size

virtual memory settings

Click Ok > Apply and restart your PC to apply the changes to virtual memory.

Step 3: Extract and open

Double-click on the download build file. It’ll open an extractor. Select the root of any one of the drives. I’ve selected E: in my case.

extract archive

Open the extracted folder and double-click on the DeepFaceLive.bat file

open the bat file

Step 4: Replace the video

Select a Video file in the file source

video source

Choose a Face detector and Device

face detector

Choose a Face marker and Device

face marker

Choose the Model and Device in Face Swapper

Face swapper

Now you see a swapped face in the Final frame preview window

swapper face preview

in Stream output choose Mode: Merged frame, Press the play button, and press window

merged frame in stream output

Now you can see the live output in the deep face live output window

output preview

A Working demo of the video with the face replaced

Check out the final output video where multiple characters’ face in the video is replaced with Elon Musk. Please don’t sue me 🫠

How to save the output video?

Select a folder in the stream output section. Make sure that you select an empty folder as multiple images will be saved to that folder.

save steam output

Now, Click on the play button and wait till the video playback completes. The video frames (images) with the face replaced will be generated in the selected folder.

How to convert generated image sequence to a video?

I personally use Adobe premiere pro to import the image sequence in the form of a video and then export it. Here’s how to do it premiere pro: Click on import in premiere pro > Select the first image and make sure to tick the Image Sequence checkbox.

import image sequence premiere pro

After this, The image sequence will be imported in the form of a video that you can export it as an MP4 or any video format that you want.

You can also use any online tools to convert an image sequence into a video. I did not find a good tool so I used Adobe Premiere Pro

Mac/Linux support

I have tried it out only on Windows but you can try it out on Mac/Linux as mentioned in the docs

Requirements

  • Nvidia-driver-470 (current)
  • cuda 11.4 (current)

Setup

git clone DeepFaceLive
cd DeepFaceLive/build/linux/
# start.sh builds and runs container with proper options, then example.sh will start DeepFaceLive with example options
./start.sh

Usage of ./start.sh
# -d specify a folder for DeepFaceLive data (videos, models, etc)
-d /home/user/DeepFaceLive_data
# -c will pass through existing video devices such as /dev/video0 and /dev/video1, etc

Supported face models

The library has already trained multiple face models which you can readily use. Check out all the trained models here

If you want a higher quality or better face match, you can train your own face model using DeepFaceLab

supported face models

Use your own picture to replace

If you want to use your own pictures instead of the existing face models then you can do it as well.

Simply take a pic of your face in a passport-size format > Click on the Eye icon in the Face Swap (Insight section) > Paste your image there > Click on the refresh icon next to the eye icon in the Face Swap section.

Now you’ll be able to see your picture name in the Face dropdown. Select your picture name and click on the play button to run the analysis and replace the face in the video with your face!

Conclusion

You can also use this library to replace face in live streams as well. Go ahead and try it out by changing the file source!

The clarity of the face swap is surprisingly good even without tweaking any configuration parameters. If you want to further fine-tune it then you can do it by playing around with different face detector models and face aligner configuration options ✌🏻

The post How to replace face in a video for free? appeared first on Coding is Love.

]]>
https://codingislove.com/replace-face-in-video-free/feed/ 3 4369
The Complete list of all MIME Types updated – 2023 https://codingislove.com/list-mime-types-2016/ https://codingislove.com/list-mime-types-2016/#comments Mon, 10 Jul 2023 19:06:30 +0000 http://new.codingislove.com/?p=880 This list is taken from Sitepoint but updated with few other MIME types used in 2017 Extension MIME type .json application/json .abw application/x-abiword .avif image/avif…

The post The Complete list of all MIME Types updated – 2023 appeared first on Coding is Love.

]]>
This list is taken from Sitepoint but updated with few other MIME types used in 2017

Complete list of all mime types

Extension MIME type
.json application/json
.abw application/x-abiword
.avif image/avif
.azw application/vnd.amazon.ebook
.cda application/x-cdf
.eot application/vnd.ms-fontobject
.epub application/epub+zip
.ics text/calendar
.jar application/java-archive
.jsonld application/ld+json
.mjs text/javascript
.mpkg application/vnd.apple.installer+xml
.odp application/vnd.oasis.opendocument.presentation
.ods application/vnd.oasis.opendocument.spreadsheet
.odt application/vnd.oasis.opendocument.text
.oga audio/ogg
.ogv video/ogg
.opus audio/opus
.otf font/otf
.php application/x-httpd-php
.svg image/svg+xml
.ts video/mp2t
.ttf font/ttf
.weba audio/webm
.webp image/webp
.woff font/woff
.woff2 font/woff2
.xhtml application/xhtml+xml
.xul application/vnd.mozilla.xul+xml
.3gp video/3gpp
.3g2 video/3gpp2
.7z application/x-7z-compressed
.mp4 video/mp4
.rar application/x-rar-compressed
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xlsm application/vnd.ms-excel.sheet.macroEnabled.12
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
.webm video/webm
.3dm x-world/x-3dmf
.3dmf x-world/x-3dmf
.a application/octet-stream
.aab application/x-authorware-bin
.aac audio/aac
.aam application/x-authorware-map
.aas application/x-authorware-seg
.abc text/vnd.abc
.acgi text/html
.afl video/animaflex
.ai application/postscript
.aif audio/aiff
.aif audio/x-aiff
.aifc audio/aiff
.aifc audio/x-aiff
.aiff audio/aiff
.aiff audio/x-aiff
.aim application/x-aim
.aip text/x-audiosoft-intra
.ani application/x-navi-animation
.aos application/x-nokia-9000-communicator-add-on-software
.aps application/mime
.arc application/octet-stream
.arj application/arj
.arj application/octet-stream
.art image/x-jg
.asf video/x-ms-asf
.asm text/x-asm
.asp text/asp
.asx application/x-mplayer2
.asx video/x-ms-asf
.asx video/x-ms-asf-plugin
.au audio/basic
.au audio/x-au
.avi application/x-troff-msvideo
.avi video/avi
.avi video/msvideo
.avi video/x-msvideo
.avs video/avs-video
.bcpio application/x-bcpio
.bin application/mac-binary
.bin application/macbinary
.bin application/octet-stream
.bin application/x-binary
.bin application/x-macbinary
.bm image/bmp
.bmp image/bmp
.bmp image/x-windows-bmp
.boo application/book
.book application/book
.boz application/x-bzip2
.bsh application/x-bsh
.bz application/x-bzip
.bz2 application/x-bzip2
.c text/plain
.c text/x-c
.c++ text/plain
.cat application/vnd.ms-pki.seccat
.cc text/plain
.cc text/x-c
.ccad application/clariscad
.cco application/x-cocoa
.cdf application/cdf
.cdf application/x-cdf
.cdf application/x-netcdf
.cer application/pkix-cert
.cer application/x-x509-ca-cert
.cha application/x-chat
.chat application/x-chat
.class application/java
.class application/java-byte-code
.class application/x-java-class
.com application/octet-stream
.com text/plain
.conf text/plain
.cpio application/x-cpio
.cpp text/x-c
.cpt application/mac-compactpro
.cpt application/x-compactpro
.cpt application/x-cpt
.crl application/pkcs-crl
.crl application/pkix-crl
.crt application/pkix-cert
.crt application/x-x509-ca-cert
.crt application/x-x509-user-cert
.csh application/x-csh
.csh text/x-script.csh
.css text/css
.csv text/csv
.cxx text/plain
.dcr application/x-director
.deepv application/x-deepv
.def text/plain
.der application/x-x509-ca-cert
.dif video/x-dv
.dir application/x-director
.dl video/dl
.dl video/x-dl
.doc application/msword
.dot application/msword
.dp application/commonground
.drw application/drafting
.dump application/octet-stream
.dv video/x-dv
.dvi application/x-dvi
.dwf drawing/x-dwf (old)
.dwf model/vnd.dwf
.dwg application/acad
.dwg image/vnd.dwg
.dwg image/x-dwg
.dxf application/dxf
.dxf image/vnd.dwg
.dxf image/x-dwg
.dxr application/x-director
.el text/x-script.elisp
.elc application/x-bytecode.elisp (compiled elisp)
.elc application/x-elc
.env application/x-envoy
.eps application/postscript
.es application/x-esrehber
.etx text/x-setext
.evy application/envoy
.evy application/x-envoy
.exe application/octet-stream
.f text/plain
.f text/x-fortran
.f77 text/x-fortran
.f90 text/plain
.f90 text/x-fortran
.fdf application/vnd.fdf
.fif application/fractals
.fif image/fif
.fli video/fli
.fli video/x-fli
.flo image/florian
.flx text/vnd.fmi.flexstor
.fmf video/x-atomic3d-feature
.for text/plain
.for text/x-fortran
.fpx image/vnd.fpx
.fpx image/vnd.net-fpx
.frl application/freeloader
.funk audio/make
.g text/plain
.g3 image/g3fax
.gif image/gif
.gl video/gl
.gl video/x-gl
.gsd audio/x-gsm
.gsm audio/x-gsm
.gsp application/x-gsp
.gss application/x-gss
.gtar application/x-gtar
.gz application/x-compressed
.gz application/x-gzip
.gzip application/x-gzip
.gzip multipart/x-gzip
.h text/plain
.h text/x-h
.hdf application/x-hdf
.help application/x-helpfile
.hgl application/vnd.hp-hpgl
.hh text/plain
.hh text/x-h
.hlb text/x-script
.hlp application/hlp
.hlp application/x-helpfile
.hlp application/x-winhelp
.hpg application/vnd.hp-hpgl
.hpgl application/vnd.hp-hpgl
.hqx application/binhex
.hqx application/binhex4
.hqx application/mac-binhex
.hqx application/mac-binhex40
.hqx application/x-binhex40
.hqx application/x-mac-binhex40
.hta application/hta
.htc text/x-component
.htm text/html
.html text/html
.htmls text/html
.htt text/webviewhtml
.htx text/html
.ice x-conference/x-cooltalk
.ico image/x-icon
.idc text/plain
.ief image/ief
.iefs image/ief
.iges application/iges
.iges model/iges
.igs application/iges
.igs model/iges
.ima application/x-ima
.imap application/x-httpd-imap
.inf application/inf
.ins application/x-internett-signup
.ip application/x-ip2
.isu video/x-isvideo
.it audio/it
.iv application/x-inventor
.ivr i-world/i-vrml
.ivy application/x-livescreen
.jam audio/x-jam
.jav text/plain
.jav text/x-java-source
.java text/plain
.java text/x-java-source
.jcm application/x-java-commerce
.jfif image/jpeg
.jfif image/pjpeg
.jfif-tbnl image/jpeg
.jpe image/jpeg
.jpe image/pjpeg
.jpeg image/jpeg
.jpeg image/pjpeg
.jpg image/jpeg
.jpg image/pjpeg
.jps image/x-jps
.js application/x-javascript
.js application/javascript
.js application/ecmascript
.js text/javascript
.js text/ecmascript
.jut image/jutvision
.kar audio/midi
.kar music/x-karaoke
.ksh application/x-ksh
.ksh text/x-script.ksh
.la audio/nspaudio
.la audio/x-nspaudio
.lam audio/x-liveaudio
.latex application/x-latex
.lha application/lha
.lha application/octet-stream
.lha application/x-lha
.lhx application/octet-stream
.list text/plain
.lma audio/nspaudio
.lma audio/x-nspaudio
.log text/plain
.lsp application/x-lisp
.lsp text/x-script.lisp
.lst text/plain
.lsx text/x-la-asf
.ltx application/x-latex
.lzh application/octet-stream
.lzh application/x-lzh
.lzx application/lzx
.lzx application/octet-stream
.lzx application/x-lzx
.m text/plain
.m text/x-m
.m1v video/mpeg
.m2a audio/mpeg
.m2v video/mpeg
.m3u audio/x-mpequrl
.man application/x-troff-man
.map application/x-navimap
.mar text/plain
.mbd application/mbedlet
.mc$ application/x-magic-cap-package-1.0
.mcd application/mcad
.mcd application/x-mathcad
.mcf image/vasa
.mcf text/mcf
.mcp application/netmc
.me application/x-troff-me
.mht message/rfc822
.mhtml message/rfc822
.mid application/x-midi
.mid audio/midi
.mid audio/x-mid
.mid audio/x-midi
.mid music/crescendo
.mid x-music/x-midi
.midi application/x-midi
.midi audio/midi
.midi audio/x-mid
.midi audio/x-midi
.midi music/crescendo
.midi x-music/x-midi
.mif application/x-frame
.mif application/x-mif
.mime message/rfc822
.mime www/mime
.mjf audio/x-vnd.audioexplosion.mjuicemediafile
.mjpg video/x-motion-jpeg
.mm application/base64
.mm application/x-meme
.mme application/base64
.mod audio/mod
.mod audio/x-mod
.moov video/quicktime
.mov video/quicktime
.movie video/x-sgi-movie
.mp2 audio/mpeg
.mp2 audio/x-mpeg
.mp2 video/mpeg
.mp2 video/x-mpeg
.mp2 video/x-mpeq2a
.mp3 audio/mpeg3
.mp3 audio/x-mpeg-3
.mp3 video/mpeg
.mp3 video/x-mpeg
.mpa audio/mpeg
.mpa video/mpeg
.mpc application/x-project
.mpe video/mpeg
.mpeg video/mpeg
.mpg audio/mpeg
.mpg video/mpeg
.mpga audio/mpeg
.mpp application/vnd.ms-project
.mpt application/x-project
.mpv application/x-project
.mpx application/x-project
.mrc application/marc
.ms application/x-troff-ms
.mv video/x-sgi-movie
.my audio/make
.mzz application/x-vnd.audioexplosion.mzz
.nap image/naplps
.naplps image/naplps
.nc application/x-netcdf
.ncm application/vnd.nokia.configuration-message
.nif image/x-niff
.niff image/x-niff
.nix application/x-mix-transfer
.nsc application/x-conference
.nvd application/x-navidoc
.o application/octet-stream
.oda application/oda
.omc application/x-omc
.omcd application/x-omcdatamaker
.omcr application/x-omcregerator
.p text/x-pascal
.p10 application/pkcs10
.p10 application/x-pkcs10
.p12 application/pkcs-12
.p12 application/x-pkcs12
.p7a application/x-pkcs7-signature
.p7c application/pkcs7-mime
.p7c application/x-pkcs7-mime
.p7m application/pkcs7-mime
.p7m application/x-pkcs7-mime
.p7r application/x-pkcs7-certreqresp
.p7s application/pkcs7-signature
.part application/pro_eng
.pas text/pascal
.pbm image/x-portable-bitmap
.pcl application/vnd.hp-pcl
.pcl application/x-pcl
.pct image/x-pict
.pcx image/x-pcx
.pdb chemical/x-pdb
.pdf application/pdf
.pfunk audio/make
.pfunk audio/make.my.funk
.pgm image/x-portable-graymap
.pgm image/x-portable-greymap
.pic image/pict
.pict image/pict
.pkg application/x-newton-compatible-pkg
.pko application/vnd.ms-pki.pko
.pl text/plain
.pl text/x-script.perl
.plx application/x-pixclscript
.pm image/x-xpixmap
.pm text/x-script.perl-module
.pm4 application/x-pagemaker
.pm5 application/x-pagemaker
.png image/png
.pnm application/x-portable-anymap
.pnm image/x-portable-anymap
.pot application/mspowerpoint
.pot application/vnd.ms-powerpoint
.pov model/x-pov
.ppa application/vnd.ms-powerpoint
.ppm image/x-portable-pixmap
.pps application/mspowerpoint
.pps application/vnd.ms-powerpoint
.ppt application/mspowerpoint
.ppt application/powerpoint
.ppt application/vnd.ms-powerpoint
.ppt application/x-mspowerpoint
.ppz application/mspowerpoint
.pre application/x-freelance
.prt application/pro_eng
.ps application/postscript
.psd application/octet-stream
.pvu paleovu/x-pv
.pwz application/vnd.ms-powerpoint
.py text/x-script.phyton
.pyc application/x-bytecode.python
.qcp audio/vnd.qcelp
.qd3 x-world/x-3dmf
.qd3d x-world/x-3dmf
.qif image/x-quicktime
.qt video/quicktime
.qtc video/x-qtc
.qti image/x-quicktime
.qtif image/x-quicktime
.ra audio/x-pn-realaudio
.ra audio/x-pn-realaudio-plugin
.ra audio/x-realaudio
.ram audio/x-pn-realaudio
.ras application/x-cmu-raster
.ras image/cmu-raster
.ras image/x-cmu-raster
.rast image/cmu-raster
.rexx text/x-script.rexx
.rf image/vnd.rn-realflash
.rgb image/x-rgb
.rm application/vnd.rn-realmedia
.rm audio/x-pn-realaudio
.rmi audio/mid
.rmm audio/x-pn-realaudio
.rmp audio/x-pn-realaudio
.rmp audio/x-pn-realaudio-plugin
.rng application/ringing-tones
.rng application/vnd.nokia.ringing-tone
.rnx application/vnd.rn-realplayer
.roff application/x-troff
.rp image/vnd.rn-realpix
.rpm audio/x-pn-realaudio-plugin
.rt text/richtext
.rt text/vnd.rn-realtext
.rtf application/rtf
.rtf application/x-rtf
.rtf text/richtext
.rtx application/rtf
.rtx text/richtext
.rv video/vnd.rn-realvideo
.s text/x-asm
.s3m audio/s3m
.saveme application/octet-stream
.sbk application/x-tbook
.scm application/x-lotusscreencam
.scm text/x-script.guile
.scm text/x-script.scheme
.scm video/x-scm
.sdml text/plain
.sdp application/sdp
.sdp application/x-sdp
.sdr application/sounder
.sea application/sea
.sea application/x-sea
.set application/set
.sgm text/sgml
.sgm text/x-sgml
.sgml text/sgml
.sgml text/x-sgml
.sh application/x-bsh
.sh application/x-sh
.sh application/x-shar
.sh text/x-script.sh
.shar application/x-bsh
.shar application/x-shar
.shtml text/html
.shtml text/x-server-parsed-html
.sid audio/x-psid
.sit application/x-sit
.sit application/x-stuffit
.skd application/x-koan
.skm application/x-koan
.skp application/x-koan
.skt application/x-koan
.sl application/x-seelogo
.smi application/smil
.smil application/smil
.snd audio/basic
.snd audio/x-adpcm
.sol application/solids
.spc application/x-pkcs7-certificates
.spc text/x-speech
.spl application/futuresplash
.spr application/x-sprite
.sprite application/x-sprite
.src application/x-wais-source
.ssi text/x-server-parsed-html
.ssm application/streamingmedia
.sst application/vnd.ms-pki.certstore
.step application/step
.stl application/sla
.stl application/vnd.ms-pki.stl
.stl application/x-navistyle
.stp application/step
.sv4cpio application/x-sv4cpio
.sv4crc application/x-sv4crc
.svf image/vnd.dwg
.svf image/x-dwg
.svr application/x-world
.svr x-world/x-svr
.swf application/x-shockwave-flash
.t application/x-troff
.talk text/x-speech
.tar application/x-tar
.tbk application/toolbook
.tbk application/x-tbook
.tcl application/x-tcl
.tcl text/x-script.tcl
.tcsh text/x-script.tcsh
.tex application/x-tex
.texi application/x-texinfo
.texinfo application/x-texinfo
.text application/plain
.text text/plain
.tgz application/gnutar
.tgz application/x-compressed
.tif image/tiff
.tif image/x-tiff
.tiff image/tiff
.tiff image/x-tiff
.tr application/x-troff
.tsi audio/tsp-audio
.tsp application/dsptype
.tsp audio/tsplayer
.tsv text/tab-separated-values
.turbot image/florian
.txt text/plain
.uil text/x-uil
.uni text/uri-list
.unis text/uri-list
.unv application/i-deas
.uri text/uri-list
.uris text/uri-list
.ustar application/x-ustar
.ustar multipart/x-ustar
.uu application/octet-stream
.uu text/x-uuencode
.uue text/x-uuencode
.vcd application/x-cdlink
.vcs text/x-vcalendar
.vda application/vda
.vdo video/vdo
.vew application/groupwise
.viv video/vivo
.viv video/vnd.vivo
.vivo video/vivo
.vivo video/vnd.vivo
.vmd application/vocaltec-media-desc
.vmf application/vocaltec-media-file
.voc audio/voc
.voc audio/x-voc
.vos video/vosaic
.vox audio/voxware
.vqe audio/x-twinvq-plugin
.vqf audio/x-twinvq
.vql audio/x-twinvq-plugin
.vrml application/x-vrml
.vrml model/vrml
.vrml x-world/x-vrml
.vrt x-world/x-vrt
.vsd application/x-visio
.vst application/x-visio
.vsw application/x-visio
.w60 application/wordperfect6.0
.w61 application/wordperfect6.1
.w6w application/msword
.wav audio/wav
.wav audio/x-wav
.wb1 application/x-qpro
.wbmp image/vnd.wap.wbmp
.web application/vnd.xara
.wiz application/msword
.wk1 application/x-123
.wmf windows/metafile
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.word application/msword
.wp application/wordperfect
.wp5 application/wordperfect
.wp5 application/wordperfect6.0
.wp6 application/wordperfect
.wpd application/wordperfect
.wpd application/x-wpwin
.wq1 application/x-lotus
.wri application/mswrite
.wri application/x-wri
.wrl application/x-world
.wrl model/vrml
.wrl x-world/x-vrml
.wrz model/vrml
.wrz x-world/x-vrml
.wsc text/scriplet
.wsrc application/x-wais-source
.wtk application/x-wintalk
.xbm image/x-xbitmap
.xbm image/x-xbm
.xbm image/xbm
.xdr video/x-amt-demorun
.xgz xgl/drawing
.xif image/vnd.xiff
.xl application/excel
.xla application/excel
.xla application/x-excel
.xla application/x-msexcel
.xlb application/excel
.xlb application/vnd.ms-excel
.xlb application/x-excel
.xlc application/excel
.xlc application/vnd.ms-excel
.xlc application/x-excel
.xld application/excel
.xld application/x-excel
.xlk application/excel
.xlk application/x-excel
.xll application/excel
.xll application/vnd.ms-excel
.xll application/x-excel
.xlm application/excel
.xlm application/vnd.ms-excel
.xlm application/x-excel
.xls application/excel
.xls application/vnd.ms-excel
.xls application/x-excel
.xls application/x-msexcel
.xlt application/excel
.xlt application/x-excel
.xlv application/excel
.xlv application/x-excel
.xlw application/excel
.xlw application/vnd.ms-excel
.xlw application/x-excel
.xlw application/x-msexcel
.xm audio/xm
.xml application/xml
.xml text/xml
.xmz xgl/movie
.xpix application/x-vnd.ls-xpix
.xpm image/x-xpixmap
.xpm image/xpm
.x-png image/png
.xsr video/x-amt-showrun
.xwd image/x-xwd
.xwd image/x-xwindowdump
.xyz chemical/x-pdb
.z application/x-compress
.z application/x-compressed
.zip application/x-compressed
.zip application/x-zip-compressed
.zip application/zip
.zip multipart/x-zip
.zoo application/octet-stream
.zsh text/x-script.zsh

Missing a MIME Type? Comment below, We’ll update it.

The post The Complete list of all MIME Types updated – 2023 appeared first on Coding is Love.

]]>
https://codingislove.com/list-mime-types-2016/feed/ 7 880
Amazing AI slider created using javascript animations https://codingislove.com/amazing-ai-slider/ https://codingislove.com/amazing-ai-slider/#respond Mon, 10 Jul 2023 18:22:18 +0000 https://codingislove.com/?p=4362 Check out this interesting animation made with GSAP (Green Sock animation platform). You can tap the slider and change the value but the AI robot…

The post Amazing AI slider created using javascript animations appeared first on Coding is Love.

]]>
Check out this interesting animation made with GSAP (Green Sock animation platform). You can tap the slider and change the value but the AI robot will change it back to 11 again.

This is a fun effect created to showcase the power of Javascript animations.

AI slider demo

Live demo and Full source code

See the Pen AI Slider by Chris Gannon (@chrisgannon) on CodePen.

The post Amazing AI slider created using javascript animations appeared first on Coding is Love.

]]>
https://codingislove.com/amazing-ai-slider/feed/ 0 4362
Free avatar library for developers and designers | DiceBear https://codingislove.com/free-avatar-library-developers-designers/ https://codingislove.com/free-avatar-library-developers-designers/#respond Sun, 09 Jul 2023 12:58:30 +0000 https://codingislove.com/?p=4351 Avatars are needed in almost every app. Be it as a placeholder for profile photos or as a full-fledged avatar system in your app. Let’s…

The post Free avatar library for developers and designers | DiceBear appeared first on Coding is Love.

]]>
Avatars are needed in almost every app. Be it as a placeholder for profile photos or as a full-fledged avatar system in your app. Let’s see how to implement avatars for an app using DiceBear

Example avatars

DiceBear

DiceBear is an avatar library for designers and developers. Create avatars for your profiles, designs, websites, or apps. Piece by piece or based on a seed.

Features

  • More than 25 avatar styles!
  • Fully customizable!
  • Free and fast HTTP API!

Examples

Avataaars

Avataaars Neutral

Bottts

Micah

How to use it?

Are you a designer and need avatars for your design? Then check out their Figma Plugin and Editor. As a developer, you could take a look at the HTTP API, the CLI, the JS library or the Playground. Which is more appropriate for you, depends on the programming language and environment you are using.

In a JavaScript environment, you could use the JS library or the HTTP API if the JS library is too large for you. In other environments, you might be interested in the HTTP API or the CLI if you are concerned about the stability or latency of the HTTP API.

The CLI is always a good choice for automation or if you want to create a large number of avatars in different image formats.

How does it work?

The avatars are created in SVG format. This allows to generate avatars dynamically without much computing power. In most cases, various SVG elements such as hair, eyes, ears, etc. are selected from a set and combined to create a character/avatar.

XorShift32 is used as the algorithm for the PRNG. It is important to note that the PNGR does not attempt to be cryptographically secure.

Usage

HTTP API:

https://api.dicebear.com/6.x/adventurer/svg
<img
  src="https://api.dicebear.com/6.x/adventurer/svg"
  alt="avatar"
/>

JS-Library:

First install the required packages via npm:

npm install @dicebear/core @dicebear/collection --save

Then you can create this avatar as follows:

import { createAvatar } from '@dicebear/core';
import { adventurer } from '@dicebear/collection';

const avatar = createAvatar(adventurer, {
  // ... options
});

const svg = avatar.toString();

CLI:

First install the CLI package via npm:

npm install --global dicebear

Then you can create this avatar as follows:

dicebear adventurer

Get a specific avatar

If you want to get a specific avatar using a name then you can use the seed option

Example:

https://api.dicebear.com/6.x/avataaars/svg?seed=Buster

Output:

avatar sample

Conclusion

This is a very useful library for generating avatars for your next project. Head over to their playground for exploring further

The post Free avatar library for developers and designers | DiceBear appeared first on Coding is Love.

]]>
https://codingislove.com/free-avatar-library-developers-designers/feed/ 0 4351
How to generate an invoice from the command line? https://codingislove.com/generate-invoice-cli/ https://codingislove.com/generate-invoice-cli/#respond Sat, 08 Jul 2023 11:21:53 +0000 https://codingislove.com/?p=4341 Wouldn’t it be awesome if you write a command with some arguments and it generates an invoice for you instantly? Here’s how to do it!…

The post How to generate an invoice from the command line? appeared first on Coding is Love.

]]>
Wouldn’t it be awesome if you write a command with some arguments and it generates an invoice for you instantly? Here’s how to do it!

Generate invoice from command line

Introducing Invoice CLI

Generate invoices from the command line using this CLI tool

Installation

Install with Go:

go install github.com/maaslalani/invoice@main

Or download a binary from the releases.

Command Line Interface

invoice generate --from "Company A, Inc." --to "Company B, Inc." \ --item "Laptop" --quantity 2 --rate 500 \ --tax 0.1 --discount 0.15 \ --note "Paid via online transfer"
generate invoice from command line

The PDF would be generated in the same folder in which you are running the command. You can customize the output location with --output.

Sample output

Here’s an example of the generated PDF after running the above command

Generated PDF sample

Environment

Save repeated information with environment variables:

export INVOICE_LOGO=/path/to/image.png
export INVOICE_FROM="Dream, Inc."
export INVOICE_TO="Imagine, Inc."
export INVOICE_TAX=0.13
export INVOICE_RATE=25

Generate new invoice:

invoice generate \
    --item "Yellow Rubber Duck" --quantity 5 \
    --item "Special Edition Plaid Rubber Duck" --quantity 1 \
    --note "For debugging purposes." \
    --output duck-invoice.pdf

Configuration File

Or, save repeated information with JSON / YAML:

{
    "logo": "/path/to/image.png",
    "from": "Dream, Inc.",
    "to": "Imagine, Inc.",
    "tax": 0.13,
    "items": ["Yellow Rubber Duck", "Special Edition Plaid Rubber Duck"],
    "quantities": [5, 1],
    "rates": [25, 25],
}

Generate a new invoice by importing the configuration file:

invoice generate --import path/to/data.json \
    --output duck-invoice.pdf

Custom Templates

Unfortunately, The CLI doesn’t allow custom invoice templates. If you would like a custom invoice template for your business or company, please reach out to the author via:

Also, Read Machine Learning for beginners, a Free curriculum from Microsoft

The post How to generate an invoice from the command line? appeared first on Coding is Love.

]]>
https://codingislove.com/generate-invoice-cli/feed/ 0 4341