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 / git-pull-all.bash
Last active January 9, 2019 10:40
Git pull all
# https://stackoverflow.com/a/17678331/2190689
function git-pull-all() {
START=$(git symbolic-ref --short -q HEAD);
for branch in $(git branch | sed 's/^.//'); do
git checkout $branch;
git pull ${1:-origin} $branch || break;
done;
git checkout $START;
};
@ssi-anik
ssi-anik / reverse-proxy.go
Created November 6, 2018 10:42
ilanyu/reverse-proxy golang server
package main
import (
"context"
"flag"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"
@ssi-anik
ssi-anik / Dockerfile
Created October 10, 2018 18:05
php:7.2-rc-zts-alpine +pthreads +xdebug
FROM php:7.2-rc-zts-alpine
ARG APP_USER_USERNAME=app
RUN apk update && apk add --no-cache \
sudo bash \
g++ make autoconf \
libxml2-dev icu-dev curl-dev pcre-dev
RUN adduser -D -s /bin/bash $APP_USER_USERNAME \

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 / 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 / php-docker-ext
Created August 28, 2018 19:21 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@ssi-anik
ssi-anik / go-dep
Created June 5, 2018 15:58
Google PubSub With Go and PHP
go get -u cloud.google.com/go/pubsub
@ssi-anik
ssi-anik / main.go
Created May 27, 2018 21:00 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@ssi-anik
ssi-anik / main.go
Created May 27, 2018 21:00 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@ssi-anik
ssi-anik / put-object-on-aws-s3.php
Created February 4, 2018 20:50 — forked from keithweaver/put-object-on-aws-s3.php
Upload an image/object to an AWS S3 Bucket using PHP
<?php
// Installed the need packages with Composer by running:
// $ composer require aws/aws-sdk-php
$filePath = "https://example.com/test.png";
require 'vendor/autoload.php';
$bucketName = 'YOUR_BUCKET_NAME';
$filePath = './YOUR_FILE_NAME.png';