Skip to content

Instantly share code, notes, and snippets.

View lionrajkumar's full-sized avatar
💭
Must Learn Today

Rajkumar lionrajkumar

💭
Must Learn Today
View GitHub Profile

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@lionrajkumar
lionrajkumar / PWA.md
Created September 8, 2022 12:13
Creating Progressive Web App tuts

Progressive Web App

  • Create Required Icons
  • create manifest.json
    {
        "short_name": "lionrajkumar",
        "name": "Rajkumar Ramadoss",
        "description": "Portfolio",
        "icons": [
            {

Laravel Generators

Migrations

Generate Laravel Migrations from an existing database, including indexes and foreign keys!

composer xethron/migrations-generator

GitHub

Seeder

@lionrajkumar
lionrajkumar / DisableChromeCast.md
Created August 10, 2022 10:14
Disable Chrome Cast option in Browser

Disable Chrome Cast option in Browser

  1. Goto
chrome://flags/#global-media-controls-cast-start-stop
  1. Select Default Or Disable options
  2. Click Relaunch button
@lionrajkumar
lionrajkumar / DeployPHPWebsiteOnHeroku.md
Created August 8, 2022 17:22
Deploy a PHP Website on Heroku

Deploy a PHP Website on Heroku

  • Install the Heroku Command Line Interface (CLI)

  • Use the heroku login command to log in to the Heroku CLI

  • Check if you have PHP(php -v), Composer(composer -V), & Git(git --version) installed

  • Clone your Package

    git clone https://github.com/heroku/php-getting-started.git
    cd php-getting-started

Laravel API request logger

Create new logging channels in config/logging.php file. Append below array winth in 'channels' array

'api' => [
    'driver' => 'daily',
    'path' => storage_path('logs/apis.log'),
    'level' => 'debug',
],
@lionrajkumar
lionrajkumar / WebCDN.md
Last active May 7, 2022 11:30
CDN for web developments

Bootstrap

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
          crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
            integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
            crossorigin="anonymous"></script>
@lionrajkumar
lionrajkumar / File download with resume in PHP.md
Created February 27, 2022 16:45
PHP file download with parts

Support download with resume in PHP

Requirement

In web application, we often need to provide file downloads. For small files, there is no problems since it needs a short time to download. For large files, it’s useful to allow downloads to be resumed. Doing so is more involved, but it’s really worth doing, especially if you serve large files or video/audio. We can do a resumable downloads with the Http headers of Accept-Ranges, Content-Range, Range.

Http Headers

  • Accept-Ranges
    Accept-Ranges: bytes
    
@lionrajkumar
lionrajkumar / unpackWpress.md
Created December 6, 2021 09:44
Unpack .wpress archive files created by the All-in-one-Wp-Migration Wordpress plugin

A simple 2-step tutorial how to extract a file with the .wpress extension on your computer:

1. Step

Make sure that you have Node.js installed in your computer:

node --version

2. Step

In your terminal navigate to the location where the .wpress file is downloaded (e.g. ~/Downloads) and run the following command:

npx wpress-extract migration.wpress
@lionrajkumar
lionrajkumar / dataTablesExportButtons.md
Last active June 30, 2021 18:01
dataTables Export Buttons

dataTable in VueJs

Install and use dataTable in vueJs

lionrajkumar

Installation

Install the dependencies and devDependencies and start the server.

npm install datatables.net-dt