Skip to content

Instantly share code, notes, and snippets.

View ashishakya's full-sized avatar
🏠
Working from home

Ashish Shakya ashishakya

🏠
Working from home
  • YoungInnovations
  • Kumaripati
View GitHub Profile
@ashishakya
ashishakya / 00_get_certificate.sh
Last active August 6, 2025 05:49
Setup letsEncrypt in EBS
# path: .platform/hooks/postdeploy/00_get_certificate.sh (remove this line)
# set a env variable of DOMAIN_NAME and EMAIL_ADDRESS in the elastic bean stalk environment
#!/usr/bin/env bash
# Load environment variables
#source /opt/elasticbeanstalk/support/envvars
# Use environment variables
DOMAIN_NAME="${DOMAIN_NAME}"
EMAIL_ADDRESS="${EMAIL_ADDRESS}"
@ashishakya
ashishakya / install_imagick.config
Created March 31, 2025 08:04
Elastic Bean Stalk .ebextensions file configuration
packages:
yum:
ImageMagick: []
ImageMagick-devel: []
commands:
01_install_imagickphp:
cwd: /tmp
test: "php -r \"exit(extension_loaded('imagick') ? 1 : 0);\""
command: |
@ashishakya
ashishakya / Vue.vue
Created August 10, 2023 04:58
inspection
<template>
<!-- <div class="page-content"> -->
<div class="object-detail m-b-40">
<div>
<div class="card-body page-content-inspect-block-card-body">
<form
enctype="multipart/form-data"
@submit.prevent="submitForm"
>
herhee
@ashishakya
ashishakya / app.scss
Created July 28, 2022 03:41
Utility css
.required:after {
content: " *";
color: red;
}
[
{
"answer": "A ullam tempor saepe",
"parent": {
"id": 1,
"section": {
"key": "personal_details",
"label": "Personal Details"
},
"field_type": "text",
@ashishakya
ashishakya / BaseService.php
Last active January 4, 2023 05:40
Updated snippet via Qaasaa
<?php
namespace App\Services\Tenancy;
use App\Criterias\BaseCriteria;
use App\Repositories\Tenancy\BaseRepository;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Prettus\Repository\Exceptions\RepositoryException;
use Prettus\Repository\Presenter\FractalPresenter;
@ashishakya
ashishakya / fractal-tranformer.php
Created June 30, 2022 05:26
pankaj dai ram katha
<?php
namespace App\Transformers\Tenancy\LeadsCustomField;
use App\Models\Tenancy\LeadsCustomField;
use Illuminate\Support\Str;
use League\Fractal\TransformerAbstract;
/**
* Class LeadsCustomFieldListTransformer
@ashishakya
ashishakya / DockerFile
Created April 15, 2022 05:29
DockerFile for Qaasaa
FROM php:7.4-fpm
# Copy composer.lock and composer.json
#COPY composer.lock composer.json /var/www/
COPY composer.json /var/www/
# Set working directory
WORKDIR /var/www
# Install dependencies
@ashishakya
ashishakya / docker.xml
Created March 24, 2022 07:21
Dcoker scripts
docker compose up (image pull) => app container banaidey
docker exec -it app bash
composer install
key:generate
@ashishakya
ashishakya / server.txt
Created March 24, 2022 07:17
ip tables rules for oracle server
sudo iptables-save > ~/iptables-rules
## modify rules, remove drop and reject lines
grep -v "DROP" iptables-rules > tmpfile && mv tmpfile iptables-rules-mod
grep -v "REJECT" iptables-rules-mod > tmpfile && mv tmpfile iptables-rules-mod
## apply the modifications
sudo iptables-restore < ~/iptables-rules-mod
## check
sudo iptables -L
## save the changes
sudo netfilter-persistent save