Skip to content

Instantly share code, notes, and snippets.

View ssi-anik's full-sized avatar
💻
Open to remote work!

Syed Sirajul Islam Anik ssi-anik

💻
Open to remote work!
View GitHub Profile
@ssi-anik
ssi-anik / .zsh_aliases
Last active April 2, 2024 11:23
.zsh*
alias html="cd /var/www/html"
alias phpunit="./vendor/bin/phpunit"
alias tinker="$HOME/.config/composer/vendor/bin/psysh"
alias psysh="$HOME/.config/composer/vendor/bin/psysh"
alias szsh=". ~/.zshrc"
alias activate=activate_python_virtualenv
alias py3=python3
#". /var/www/html/python/env1/bin/activate"
alias sshorder="ssh anik@96.57.0.134"
alias pbcopy='xclip -selection clipboard'
@ssi-anik
ssi-anik / server.py
Created January 27, 2020 17:42
Simple Python HTTP Server
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
# Cloned & Updated from: https://gist.github.com/1kastner/e083f9e813c0464e6a2ec8910553e632
import json
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
allow = False
<?php
# File: app\Http\Middleware\CORS.php
# Create file with below code in above location. And at the end of the file there are other instructions also.
# Please check.
namespace App\Http\Middleware;
use Closure;
class CORS {
@ssi-anik
ssi-anik / docker-rm-images.md
Last active July 24, 2023 08:33 — forked from alferov/docker-rm-images.md
Remove all (untagged) images and containers from Docker
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")
# Delete unused images
docker system prune --all
@ssi-anik
ssi-anik / Dockerfile
Created June 27, 2020 19:17
PHP dockerfile for rdkafka/kafka/libkafka
FROM php:7.4-fpm
RUN apt-get update
RUN apt-get install -y librdkafka-dev
RUN pecl install channel://pecl.php.net/rdkafka-beta
RUN rm -rf /tmp/pear
@ssi-anik
ssi-anik / Dockerfile
Created July 18, 2021 09:16
xdebug 3, docker integrate with PhpStorm
FROM sirajul/php74-fpm:latest
RUN pecl install xdebug
#RUN docker-php-ext-enable xdebug
RUN mkdir -p /home/xdebug
COPY ./docker/php/xdebug-debug.ini /home/xdebug/xdebug-debug.ini
COPY ./docker/php/xdebug-default.ini /home/xdebug/xdebug-default.ini
COPY ./docker/php/xdebug-off.ini /home/xdebug/xdebug-off.ini
COPY ./docker/php/xdebug-profile.ini /home/xdebug/xdebug-profile.ini
@ssi-anik
ssi-anik / php.dockerfile
Created July 6, 2020 17:32
Elastic APM agent PHP installation in Docker container
FROM php:7.4-fpm
RUN apt-get update
RUN apt-get install -y libpq-dev libpng-dev curl nano unzip zip git jq supervisor
RUN docker-php-ext-install pdo_pgsql
RUN pecl install -o -f redis

MongoDB Practice

MongoDB Exercise in mongo shell

Connect to a running mongo instance, use a database named mongo_practice.

Document all your queries in a javascript file to use as a reference.

Insert Documents

@ssi-anik
ssi-anik / script.md
Last active May 2, 2022 00:13
[solved][ubunut] Docker API connection refused 127.0.0.1:2376 - docker daemon
  • Create a file on /etc/systemd/system/docker.service.d/startup_options.conf
# /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376
<?php
require './app/App.php';
require './src/Source.php';
require './Current.php';
echo (new Current())->sayHello('anik');