Skip to content

Instantly share code, notes, and snippets.

View whoisdevd's full-sized avatar

Debajyoti Das whoisdevd

View GitHub Profile
@whoisdevd
whoisdevd / Fetch Gallery URLs.php
Created May 15, 2024 08:03
PASS Migration Snippets
@whoisdevd
whoisdevd / PASS Migration Snippets.php
Last active June 6, 2024 15:30
PASS Migration Snippets
<?php
# PASS Migration Snippets
$migrations = PassPlusMigration::where('status', 'UploadingOnHold')->get();
$migrations = PassPlusMigration::where('status', PassPlusMigration::STATUS_READY)->get();
$migrations = PassPlusMigration::where('status', PassPlusMigration::STATUS_RESTORING)->get();
foreach ($migrations as $migration) { CheckRestoreStatus::dispatch($migration)->onConnection(env('SQS_RESTORE_IMAGES_CONNECTION', 'sqs-restore-images-for-migration')); MakeClassicEventItemsPublic::dispatch($migration)->onConnection(env('SQS_RESTORE_IMAGES_CONNECTION', 'sqs-restore-images-for-migration')); }
foreach ($migrations as $migration) { CheckRestoreStatus::dispatch($migration)->onConnection(env('SQS_RESTORE_IMAGES_CONNECTION', 'sqs-restore-images-for-migration')); }
@whoisdevd
whoisdevd / pets.php
Created April 24, 2023 06:59
Array of common pet species and their breeds
<?php
return [
'Dog' => [
'Alapaha Blue Blood Bulldog',
'Alaskan Husky',
'Alaskan Klee Kai',
'Alaskan Malamute',
'Alopekis',
'Akita',
@whoisdevd
whoisdevd / notes.md
Created September 4, 2022 08:59
Health Planet - Smart Contract Usage

Health Planet - Fitness Application

Basic functions and their usage

function mintForUser (bytes32 userDetail) external onlyOwner; ==> This function is used to mint the NFT and connect that NFT to a particular user

function burnUserToken (bytes32 userDetail, uint tokenId) external onlyOwner ==> This function is used to burn the NFT and remove all the details for that user

@whoisdevd
whoisdevd / response.json
Created August 24, 2020 20:48
ES Kibana
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
@whoisdevd
whoisdevd / queries
Last active August 29, 2020 14:35
ES Kibana
# Create a new index for restaurants
PUT /restaurant
# Delete the index whenever you make schema changes and re-create the index. Search will not work for existing data if the index is deleted and recreated, unless back filled.
DELETE /restaurant
# Set mappings
PUT /restaurant/_mapping/doc
{
"properties": {
@whoisdevd
whoisdevd / Guidelines.md
Last active August 5, 2020 08:57
Conventions & Workflow

1. Coding Standard

This section explains how one should write and maintain code in development environment. Some coding principles may differ from one to another in diffrent tech stack but basic idology remains the same and we encourage you to follow the conventions throughout.

PSR Compliance

All PHP code MUST follow PSR guidelines. Most likely your project's server side is based on LAMP stack and uses Laravel as core framework. Since Laravel follows PSR-2 we like to stick to it and expect you to follow the same guidelines in most of PHP development environments.

We strongly recommend that all code MUST comply with PSR-1, PSR-2, PSR-4 standards. Make sure you read through the mentioned PSR guidelines.

{
"payment_methods": {
"net_banking": false,
"bhim": true,
"card": true,
"phonepe": true,
"paytm": true,
"cod": true
},
"support": {
{"name": "Quality",
"children": [
{
"name": "Machine",
"children": [
{"name": "Mill"},
{"name": "Mixer"},
{"name": "Metal Lathe"}
]
},
@whoisdevd
whoisdevd / AppHelper.java
Last active October 5, 2017 19:41 — forked from anggadarkprince/AppHelper.java
Upload file with Multipart Request Volley Android
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import java.io.ByteArrayOutputStream;
/**
* Sketch Project Studio
* Created by Angga on 12/04/2016 14.27.
*/
public class AppHelper {