Skip to content

Instantly share code, notes, and snippets.

View Vaviloff's full-sized avatar
🤖
Automating all anything

Vlad Vaviloff Vaviloff

🤖
Automating all anything
View GitHub Profile
#!/bin/bash
# https://gist.github.com/Vaviloff/9ee6b0c68393a98a0e9c715ba4063fe3
# Development box setup script
# Run as root - sets up system for a user $user
user="vaviloff"
set -e # Exit on any error
@Vaviloff
Vaviloff / run.tpl
Created December 1, 2024 18:14 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}

Error: libevent-2.1.so.7: cannot open shared object file

Install libevent from source:

wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar xvfz libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable
./configure --prefix=/usr/local/libevent/2_1_11
make
// ==UserScript==
// @name Litres: remove owned books from a collection page
// @namespace http://tampermonkey.net/
// @version 2024-05-05
// @description Remove already owned books from offers
// @author Vaviloff
// @match https://www.litres.ru/collections/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// ==/UserScript==
@Vaviloff
Vaviloff / twitter_oauth.sh
Created January 30, 2024 06:28 — forked from cmj/twitter_oauth.sh
Grab oauth token for use with Nitter (requires Twitter account)
#!/bin/bash
# Grab oauth token for use with Nitter (requires Twitter account).
# results: {"oauth_token":"xxxxxxxxxx-xxxxxxxxx","oauth_token_secret":"xxxxxxxxxxxxxxxxxxxxx"}
username=""
password=""
if [[ -z "$username" || -z "$password" ]]; then
echo "needs username and password"
exit 1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Dialog demo</title>
</head>
<body>
/graphql/30bHSx-YYMzaygsBwfhftA/AddRemoveUserFromList
/graphql/xIZJPQBK0Zz62_BDLNLHKw/AddSuperFollowPrivacy
/graphql/R1ks8NLVisD-416R3mAk_w/AllSubscribedListsTimeline
/graphql/nxtTgq_TxeEDm0gmsGqK_Q/ArticleTweetsTimeline
/graphql/zacmhLyVLzFAKvH-yia8OA/AudiospaceAddSharing
/graphql/IZ1drq74xph2Gym7gGgtRw/AudiospaceBrowseSpaceTopicsQuery
/graphql/N80MQ7fkrpuq1-kCWVSvzQ/AudiospaceByRestId
/graphql/PTAe3LYPhlCcPJtwpyyx-w/AudiospaceDeleteSharing
/graphql/NiYfwFZDe-90MSqpGEI16w/AudiospaceGiveawayTickets
/graphql/g1mB1D5y3z_NkFsN-FwZdA/AudiospaceIsSubscribedQuery
#!/bin/bash
SERVER=$1
EXTIP=$(curl -s api.ipify.org)
line=$( lxc info $SERVER | grep inet: | grep /24 )
IP=$(echo "$line" | grep -oE 'inet:\s+([0-9]{1,3}\.){3}[0-9]{1,3}' | awk '{print $2}')
SERVERPORT=$(echo $IP | cut -d '.' -f4 )
@Vaviloff
Vaviloff / redis-commander-docker-compose.yml
Created February 6, 2023 07:12
Supply Redis password for the Redis Commander Docker container
version: '3.7'
services:
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
restart: always
environment:
- REDIS_HOSTS=label:host:port:dbnum:password