Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am turall on github.
  • I am turalmuradov (https://keybase.io/turalmuradov) on keybase.
  • I have a public key ASCLcUUeAXIIAW8VZJ8XcsfaDgq2hvpDRFExvVwRStJ9QQo

To claim this, I am signing this object:

@Turall
Turall / tee.go
Created July 20, 2022 17:41 — forked from jerblack/tee.go
Golang: Mirror all writes to stdout and stderr in program to log file
package main
import (
"fmt"
"io"
"log"
"os"
)
func main() {
@Turall
Turall / one_liner.sh
Created November 6, 2021 10:18 — forked from zparnold/one_liner.sh
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
GET /_cat/indices?v
GET /_cat/indices?h=index
GET logstash-*/_settings
@Turall
Turall / settings.json
Created May 31, 2021 10:06
my vscode settings
{
"python.pythonPath": "/usr/bin/python3",
"workbench.iconTheme": "vscode-icons",
"files.exclude": {
"out": true,
"**/*.pyc": true,
".nyc_output": true,
"obj": true,
"bin": true,
"**/__pycache__": true,
@Turall
Turall / asyncio_examples.py
Created April 26, 2021 05:27 — forked from gvbgduh/asyncio_examples.py
Asyncio examples and comparisons for concurrent requests
import asyncio
import functools
import requests as r
import requests_async as ra # Might be deprecated soon, http3 and aiohttp to consider
import uvloop
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from time import time, sleep
@Turall
Turall / gunicorn.py
Created April 2, 2021 11:27 — forked from HacKanCuBa/gunicorn.py
A config file of gunicorn(http://gunicorn.org/) contains fundamental configuration.
"""Gunicorn config file.
by HacKan (https://hackan.net)
Find it at: https://gist.github.com/HacKanCuBa/275bfca09d614ee9370727f5f40dab9e
Based on: https://gist.github.com/KodeKracker/6bc6a3a35dcfbc36e2b7
Changelog
=========
See revisions to access other versions of this file.
version: 0.1.8
Configs:
 - SourceConfig:
 dbURI: "mysql://root:admin@127.0.0.1/old"
 - DestinationConfig:
 dbURI: "postgresql://root:admin@127.0.0.1/new"
CREATE TABLE public."User" (
created_at timestamp NOT NULL,
updated_at timestamp NULL,
id serial NOT NULL,
"name" varchar NOT NULL,
surname varchar NOT NULL,
nickname varchar NOT NULL,
email varchar NOT NULL,
"password" varchar NOT NULL,
CONSTRAINT "User_email_key" UNIQUE (email),
@Turall
Turall / user.sql
Last active February 15, 2021 16:48
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`fname` varchar(10) NOT NULL,
`lname` varchar(10) NOT NULL,
`nick` varchar(10) NOT NULL,
`email` varchar(15) NOT NULL,
`pass` varchar(15) NOT NULL,
`updated` TIMESTAMP NULL,
`created` TIMESTAMP NOT NULL,
`companyID` INT,