Skip to content

Instantly share code, notes, and snippets.

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

Istiyak Tailor taist24

🏠
Working from home
View GitHub Profile
@taist24
taist24 / participation.service.ts
Created September 5, 2024 02:49
Participant Service
import {
BadRequestException,
ConflictException,
Injectable,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Event, EventGenderEnum } from 'src/events/event.entity';
import { User } from 'src/users/user.entity';
import { DeepPartial, Repository } from 'typeorm';
import { Participant } from './participant.entity';
@taist24
taist24 / DownloadMix.jsx
Last active September 5, 2024 02:48
Download Button Component
import { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { toast } from 'react-toastify';
import { BASE_API_URL } from '../constants';
import { downloadFile } from '../utility';
const DownloadMix = function DownloadMix({ files }) {
const controller = new AbortController();
const [isDownloading, setDownloading] = useState(false);
@taist24
taist24 / gist:a3678d3dbdd44482f93484867b02b008
Created October 28, 2021 05:48
Laravel App Correct Permissions
sudo chown -R www-data:www-data APP_PATH
sudo usermod -a -G www-data ubuntu
sudo find APP_PATH -type f -exec chmod 644 {} \;
sudo find APP_PATH -type d -exec chmod 755 {} \;
sudo chgrp -R www-data APP_PATH/storage APP_PATH/bootstrap/cache
sudo chmod -R ug+rwx APP_PATH/storage APP_PATH/bootstrap/cache