Skip to content

Instantly share code, notes, and snippets.

View izshreyansh's full-sized avatar
💭
Writing code doesn't bug me, I'm the one that BUG the code.

Shreyansh Panchal izshreyansh

💭
Writing code doesn't bug me, I'm the one that BUG the code.
View GitHub Profile
@izshreyansh
izshreyansh / client_report.html
Last active November 17, 2022 04:38
client report pdf test: https://qqhkb.csb.app/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Static Template</title>
<style>
body {
padding: 0;
@izshreyansh
izshreyansh / default.conf
Created June 8, 2021 05:26
nginx template
# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/{{ SITE }}/before/*;
server {
listen {{ PORT }};
listen {{ PORT_V6 }};
server_name {{ DOMAINS }};
server_tokens off;
root {{ PATH }};
@izshreyansh
izshreyansh / README.md
Last active April 2, 2021 10:39
HTML Recommendation

HTML Preferences

  • Make use of Bootstrap classes Don’t create new custom classes if you can achieve something using Bootstrap class. Try to extract styling that is provided by bootstrap from custom class.

Eg: For example this custom class is not required at all. (eg: .service)

.service {
 font-weight: bold;
@izshreyansh
izshreyansh / README.md
Last active March 12, 2021 07:10
Comtech
  • If company name is not supplied at the time of login, App crashes. In this case either show an error or don’t let him press Login.
  • If company name is incorrect I’m getting Res failed error. This won’t make any sense to the user. Please show error that is received in the api.
  • On each screen load, A static content is displayed before displaying response from API. And it causes flickers. Show a loader while api call is in progress.
  • From navigation, In Support Centre > on click of submit ticketa form should be opened. That has same fields has Get quote button. Shreyansh has shared the api for support.
  • On Events listing page.Static string time timeis written, Replace that with actual timestamp.
  • On Event details page, gray coloured details section. These data is not displayed: Date, Time, Event Category.
  • On all page, Make Read More button a little bigger, Currently these are VERY small.
  • Event Details Page > Google Calender button is not working
@izshreyansh
izshreyansh / deploy.sh
Last active January 9, 2021 14:26
Forge recipe
cd /home/forge/project
$FORGE_PHP artisan down
git pull origin master
$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader
( flock -w 10 9 || exit 1
echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock
@izshreyansh
izshreyansh / README.md
Last active October 12, 2020 10:57
Laravel Best Practices
  • Every modification in .env file needs to be replicated in .env.example.

Ex: .env file is never commited into the repository, So 3rd developer will never know valid values to pass through in .env.

  • If css class can be traced with relationships, Don't introduce a new class.
<ul class="list-holder">
<li class="list-item">Item 1</li>
</ul>
let algoliasearch = require('algoliasearch');
let client = algoliasearch(process.env.MIX_ALGOLIA_APP_ID, process.env.MIX_ALGOLIA_SECRET);
let products = client.initIndex('products');
let ebay_orders = client.initIndex('ebay_orders');
let ebay_products = client.initIndex('ebay_products');
let amazon_orders = client.initIndex('amazon_orders');
let amazon_products = client.initIndex('amazon_products');
$('#magicSearch').autocomplete(
@izshreyansh
izshreyansh / test.js
Created August 1, 2020 16:18
firestore Sharding in vue
createCounter: function (ref, num_shards) {
let batch = db.batch();
// Initialize the counter document
batch.set(ref, { num_shards: num_shards });
// Initialize each shard with count=0
for (let i = 0; i < num_shards; i++) {
let shardRef = ref.collection('shards').doc(i.toString());
batch.set(shardRef, { count: 0 });
@izshreyansh
izshreyansh / server.com
Last active September 23, 2021 09:07
nginx-server-block
server {
listen 80 default_server;
server_name server.com;
root "/var/www/server/public";
index index.html index.htm index.php;
charset utf-8;
location / {