Skip to content

Instantly share code, notes, and snippets.

View fagci's full-sized avatar
👁️
What's happening?

Mikhail fagci

👁️
What's happening?
View GitHub Profile
@nfsarmento
nfsarmento / nginx-block-tor-ip.sh
Created December 27, 2019 13:58
nginx block tor
wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/conf.d/tor-block.conf; systemctl reload nginx
#next add the following to your nginx site conf
#In nginx you then just include the blacklist.
include /etc/nginx/conf.d/tor-block.conf;
#The file contains statements like this:
@gustavohenrique
gustavohenrique / reverse-shell.md
Created December 17, 2019 16:45
Reverse shell Cheat Sheet
@joelibaceta
joelibaceta / noaa_captures.py
Created November 10, 2019 08:53
NOAA Captures
import time
import pypredict
import subprocess
satellites = ['NOAA-18','NOAA-19','NOAA-15']
freqs = [137912500, 137100000, 137620000]
sample = '44100'
wavrate='11025'
def runForDuration(cmdline, duration):
/*
* tetris.c
*
* compile: gcc -o tetris -lncurses tetris.c
*
* tetrimino types
* 1: #### 2: ## 3: ## 4: ##
* ## ## ##
*
* 5: # 6: # 7: #
@mfa
mfa / myax_uuids_async.py
Last active March 9, 2021 18:50
Download a csv with uuids from myax
# needs: Python 3.6, requests, tqdm
import asyncio
import csv
import requests
from concurrent.futures import ThreadPoolExecutor
from tqdm import tqdm
def get_token():
from tqdm import tqdm
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
def parallel_process(array,
function,
type_pool: str = 'multithreading',
use_kwargs=False,
n_jobs=16,
front_num=3,
@tag1216
tag1216 / pipe.py
Last active March 9, 2021 18:06
Python concurrent.futures pipe
import queue
import random
import time
from concurrent.futures import ThreadPoolExecutor, Executor, Future
from contextlib import contextmanager
from threading import Thread
from tqdm import tqdm
@alexeygrigorev
alexeygrigorev / tqdm_pool.py
Created December 6, 2018 15:36
Track progress of ProcessPoolExecutor with tqdm
from glob import glob
import multiprocessing
from concurrent.futures import ProcessPoolExecutor
import cv2
from PIL import Image
import imagehash
from tqdm import tqdm
@Bktero
Bktero / sizeof_compile_time.c
Last active November 19, 2025 06:57
[C][C++] Print size of type at compile time
char (*__kaboom)[sizeof( xxx )] = 1;
// xxx can be a variable or a data type
// See https://stackoverflow.com/questions/20979565/how-can-i-print-the-result-of-sizeof-at-compile-time-in-c
// Exemple of code:
// char (*__kaboom)[sizeof( long long )] = 1;
// GCC error:
// error: invalid conversion from 'int' to 'char (*)[8]' [-fpermissive]
// So sizeof(long long) == 8
@KRostyslav
KRostyslav / tsconfig.json
Last active November 21, 2025 07:55
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".