Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Muhammad Sumon Molla Selim SumonMSelim

🎯
Focusing
View GitHub Profile
View CreateEvent.php
<?php
namespace App\Jobs;
use App\Models\Domain;
use App\Models\Event;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
@SumonMSelim
SumonMSelim / Money.php
Created Aug 6, 2020
Money with BrickMoney
View Money.php
<?php
namespace App\Entity\Embeddable;
use App\Model\Intl\MoneyInterface;
use Brick\Math\BigNumber;
use Brick\Math\Exception\NumberFormatException;
use Brick\Math\RoundingMode;
use Brick\Money\Context\CustomContext;
use Doctrine\ORM\Mapping as ORM;
View Money.php
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Embeddable
*/
@SumonMSelim
SumonMSelim / Dockerfile
Created Jun 6, 2020
dockerfile for node
View Dockerfile
FROM node:lts
ENV APP_NAME "app"
ENV HOME /home
ENV APP_DIR $HOME/$APP_NAME
RUN mkdir $APP_DIR
WORKDIR $APP_DIR
EXPOSE 3000
View docker-compose.yml
version: "3.7"
services:
node:
build:
context: ./.docker/node
dockerfile: ./Dockerfile
command: bash -c "npm install && npm start"
container_name: app
ports:
- 3001:3001
View tests.yml
name: Tests (PHP)
on: [push]
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@SumonMSelim
SumonMSelim / phpmd-ruleset.xml
Created Dec 31, 2019 — forked from slayerfat/phpmd-ruleset.xml
php mess detector ruleset for laravel and similar frameworks
View phpmd-ruleset.xml
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Laravel and similar phpmd ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Inspired by https://github.com/phpmd/phpmd/issues/137
using http://phpmd.org/documentation/creating-a-ruleset.html
</description>
View secure.config
server {
listen 443 default_server;
root /var/www/web;
# Only return Nginx in server header
server_tokens off;
ssl on;
ssl_certificate /etc/nginx/ssl/server.pem;
ssl_certificate_key /etc/nginx/ssl/server.key;
# POODLE protection
@SumonMSelim
SumonMSelim / CountriesTableSeeder.php
Created Aug 12, 2019
Countries Table Seeder for Laravel
View CountriesTableSeeder.php
<?php
use App\Country;
use Illuminate\Database\Seeder;
class CountriesTableSeeder extends Seeder
{
public function run()
{
$countries = [
@SumonMSelim
SumonMSelim / SnapshotCommand.php
Created Aug 7, 2019 — forked from ralphschindler/SnapshotCommand.php
An example Laravel app command to create and load database snapshots using S3
View SnapshotCommand.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
class SnapshotCommand extends Command
{
You can’t perform that action at this time.