Skip to content

Instantly share code, notes, and snippets.

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

Munis Isazade munisisazade

🏠
Working from home
View GitHub Profile
# Most powerfull bruteforce command Just a one line :D
printf "code: %04d\n" {0..9999} | nc localhost 4000
@munisisazade
munisisazade / docker-compose.yml
Created September 21, 2023 09:48
Elasticsearch docker-compose file
version: '3.7'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
volumes:
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z
- elasticsearch:/usr/share/elasticsearch/data:Z
ports:
@munisisazade
munisisazade / logger.py
Created August 10, 2020 08:13
Flask logger
from datetime import datetime
from inspect import getframeinfo, stack
import json
import os
LOG_LEVELS = [
"FATAL",
"ERROR",
"WARNING",
"INFO",
@munisisazade
munisisazade / __init__.pyi
Created July 9, 2020 19:54
Flask Mongo Engine Autocomplate
import decimal
from mongoengine.fields import *
class MongoEngine:
def StringField(
self,
regex=None,
max_length=None,
min_length=None,
@munisisazade
munisisazade / uwsgi.ini
Created July 1, 2020 20:53
Example conf
[uwsgi]
env = DJANGO_SETTINGS_MODULE=cassandra.settings
env = UWSGI_VIRTUALENV=/venv
env = IS_WSGI=True
env = LANG=en_US.UTF-8
workdir = /code
chdir = /code
module = cassandra.wsgi:application
master = True
pidfile = /tmp/app-master.pid
@munisisazade
munisisazade / example.py
Created April 21, 2020 20:09
Context data sharing between generic class django
from django.views import generic
class CustomView(generic.View):
def get_context_data(self, **kwargs):
context = super(CustomView, self).get_context_data(**kwargs)
context["menu"] = "menu"
context["menu"] = "footer"
return context
@munisisazade
munisisazade / main.go
Created January 16, 2020 14:23
Simple Echo Golang example
package main
import (
"encoding/json"
"fmt"
"github.com/gorilla/mux"
"net/http"
"time"
)
@munisisazade
munisisazade / mongo.js
Created December 24, 2019 13:37
Async/Await mongo Client for Node js
var MongoClient = require('mongodb').MongoClient;
var ObjectId = require('mongodb').ObjectId;
var mongodbUri = require('mongodb-uri');
var MongoURI = process.env.MONGO_URI;
var Mongo = function () {
// client
this.client = MongoClient;
// mongo uri
@munisisazade
munisisazade / requirements.txt
Created December 4, 2019 11:24
Psycopg2 Main stable versions
psycopg2==2.7.4
psycopg2-binary==2.7.4
@munisisazade
munisisazade / docker_install.sh
Last active August 14, 2019 07:34
docker-install-ubuntu-18.sh
#!/bin/bash
echo -e "Installing Docker Ubuntu Server"
apt update
apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -