Skip to content

Instantly share code, notes, and snippets.

🤤
No one is ever satisfied!

Syed Sirajul Islam Anik ssi-anik

View GitHub Profile
View syslog-ng.conf
@version:3.2
# ===============================================================================================
# Configuration file for syslog-ng, customized for remote logging
# ===============================================================================================
# Options
# Note about $HOST / HOST
# Description: The name of the source host where the message originates from.
# If the message traverses several hosts and the chain_hostnames() option is on, the first host in the chain is used.
# If the keep_hostname() option is disabled (keep_hostname(no)), the value of the $HOST macro will be the DNS hostname of the host that sent the message to syslog-ng OSE (that is, the DNS hostname of the last hop). In this case the $HOST and $HOST_FROM macros will have the same value.
View git-pull-all.bash
# 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 Nov 6, 2018
ilanyu/reverse-proxy golang server
View reverse-proxy.go
package main
import (
"context"
"flag"
"log"
"net"
"net/http"
"net/http/httputil"
"net/url"
@ssi-anik
ssi-anik / Dockerfile
Created Oct 10, 2018 — forked from andrewmackrodt/Dockerfile
php:7.2-rc-zts-alpine +pthreads +xdebug
View Dockerfile
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 \
View 1. questions.md

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
Created Sep 1, 2018 — forked from alferov/docker-rm-images.md
Remove all (untagged) images and containers from Docker
View docker-rm-images.md
# 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")

References:

@ssi-anik
ssi-anik / php-docker-ext
Created Aug 28, 2018 — forked from hoandang/php-docker-ext
Complete list of php docker ext
View 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 Jun 5, 2018
Google PubSub With Go and PHP
View go-dep
go get -u cloud.google.com/go/pubsub
@ssi-anik
ssi-anik / main.go
Created May 27, 2018 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@ssi-anik
ssi-anik / main.go
Created May 27, 2018 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
You can’t perform that action at this time.