Skip to content

Instantly share code, notes, and snippets.

View sergeycherepanov's full-sized avatar
:bowtie:
Focusing

S.Cherepanov sergeycherepanov

:bowtie:
Focusing
View GitHub Profile
@sergeycherepanov
sergeycherepanov / macos_mem.sh
Last active July 2, 2024 11:20
macos_mem.sh
#!/usr/bin/env python3
import subprocess
import re
# Get process info
ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0].decode()
vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0].decode()
# Iterate processes
# BEGIN ssh-agent
[[ -f /tmp/ssh_agent_default.env ]] && {
eval "$(cat /tmp/ssh_agent_default.env)"
} || {
ssh-agent -s > /tmp/ssh_agent_default.env
eval "$(cat /tmp/ssh_agent_default.env)"
[[ -f ~/.ssh/id_rsa ]] && ssh-add ~/.ssh/id_rsa
}
}
# END ssh-agent
class CurlAT7 < Formula
desc "Get a file from an HTTP, HTTPS or FTP server"
homepage "https://curl.haxx.se/"
url "https://curl.haxx.se/download/curl-7.88.0.tar.bz2"
mirror "http://curl.mirror.anstey.ca/curl-7.88.0.tar.bz2"
sha256 "c81f439ed02442f6a9b95836dfb3a98e0c477610ca7b2f4d5aa1fc329543d33f"
bottle do
root_url "https://f003.backblazeb2.com/file/homebrew-bottles/curl@7"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "9007f52b52811bd510f438c9bafbf96b37a765e84801216352e195fe064d270e"
@sergeycherepanov
sergeycherepanov / docker-compose.yml
Last active March 29, 2024 12:37
mitm proxy standalone
# REVERSE_URI="https://google.com" BIND_ADDRESS=0.0.0.0 BIND_PORT="3080" docker compose up -d
# curl localhost:3080
services:
traefik:
image: traefik:v2.5
command:
- "--ping=true"
- "--log.level=INFO"
- "--api.dashboard=true"
- "--providers.docker=true"
#cpu_taskset 8-11
#assign_interrupts --sleep=10s 8-11 --all
#args%3A -cpu host,kvm=off,-hypervisor,+vmx,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_vendor_id=intel
agent: 0
args: -cpu host,kvm=off,-hypervisor,+vmx,hv_time,hv_vendor_id=null -smbios type=0,vendor=HP,version=018,date=07/06/2009
balloon: 0
bios: ovmf
boot: order=sata1;ide0
cores: 4
cpu: host
.pageTitleWithDefaultLogo {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAi4AAABiCAYAAAB3T1jhAAAABmJLR0QA/wD/AP+gvaeTAAAYn0lEQVR42u2dd7gcVRnG99HnkeRKLGQvKFgpUUGl2UXFgoIVRFREBMEGiooERBRFg6BSBHtDIKCBIEgAQaQpimLEjoldCLkl9+aW3Jbbx+89yW52Z74zc2Z2dnZ2953n+f1B2Ls7O3vKe75aKDhc67crLulauPi0ro7ibV0Li2uFMcEjhBBCCEnIqNEUW7TFqQ9t17lHodarZ/sd9upeWFzJh0sIIYSQugMR09G5b2zB4hUKDxfBcqG8yRwfJCGEEEIyBNrjS9AiTqKlv1Bc1LWgeAsfHCGEEEIaRfeC4k/6Cp3bR1laHiYvvoEPjBBCCCGNZv2C4s2hlpf1HZ3n8EERQgghJDeWl47Fy6yZQxLXMs2HRAghhJDcCBfRJmrGUffCxdfwARFCCCEkh1xdLVoW7VyUf5zlgyGEEEJIDpmFVikLl64FncfxoRBCCCEkv4G6i4/ZFt+ysLicD4UQQggh+Q3S7by8Ir6leBcfCiGEEEJyzB3bXEVb+g/xoRBCCCEkr6ytFC4P8oEQQgghJMc8SOFCCCGEEAoXQgghhBAKF0IIIYRQuFC4EEIIIYTChRBCCCGEwoUQQgghFC6EEEIIIRQuhBBCCCEULoQQQgihcCGEEEIIoXAhhBBCCKFwIYSQNOkuPsnre/6BXt+LXpl/5D67Fz+RvxuhcCGEkHak/9Vv9OaGhrxmuuYGBrz+V76Ovx+hcCGEkHZj+vd/9Jrxmlp9H38/QuFCCCHtRrNZWyqtLvz9CIULIYRQuFC4EELhQgghFC4ULoRQuBBCCIULIRQuhBBC4ULhQgiFCyGEULhQuBBC4UIIIRQuhFC4EEIIhUvMa/jk073R8y6icCGkWYRL96Me7w0edZxK1yN3TPW
@sergeycherepanov
sergeycherepanov / m1dumper.sh
Last active October 2, 2021 07:30
Mysql Dumpers
#!/bin/bash
#
# headless run: bash <(curl -s -L 'https://bit.ly/m1dumper')
# or
# with specidic dump path: DUMPPATH=/tmp/magento1.sql.gz /bin/bash <(curl -s -L 'https://bit.ly/m1dumper')
set -x
set -e
[[ -f app/etc/local.xml ]] || { echo "Can't locate the 'app/etc/local.xml'"; exit 1; }
Index: distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java
--- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java (revision ef48eb35cf30adf4db14086e8aabd07ef6fb113f)
+++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java (date 1610434469093)
@@ -350,10 +350,10 @@
UserException {
#!/bin/bash
if [[ -z $1 ]]; then
echo "Domain name does not provided"
exit 1
fi
DOMAIN=$1
if cat "/usr/local/etc/openssl/localCA/index.txt" | grep ${DOMAIN}; then
diff --git src/auto/configure src/auto/configure
index 907ec6c..cb65afd 100755
--- src/auto/configure
+++ src/auto/configure
@@ -11834,6 +11834,7 @@ else
# include <stddef.h>
#endif
#include <signal.h>
+#include <bits/sigaction.h>