Skip to content

Instantly share code, notes, and snippets.

View hu553in's full-sized avatar
🏡
Working remotely

Ruslan Khasanshin hu553in

🏡
Working remotely
View GitHub Profile
@hu553in
hu553in / .zshrc
Last active November 7, 2024 00:51
Bash script to re-connect Bluetooth headphones on Linux via bluetoothctl and PulseAudio
hp() {
~/headphones.sh
}
@hu553in
hu553in / index.html
Created May 1, 2024 11:06
Simple redirection HTML page
<!DOCTYPE html>
<html lang="en" style="height: 100%; display: flex; flex-direction: column; justify-content: center">
<head>
<meta http-equiv="refresh" content="0; url=https://example.com/" />
</head>
<body style="margin: 0">
<p style="text-align: center">
Скоро вы будете перенаправлены на сайт.<br />
@hu553in
hu553in / ssh-login-notification.sh
Last active May 18, 2024 00:05
Send Telegram notification about SSH login
#!/bin/bash
# this file need to be stored in /etc/profile.d
# variables below must be initialized in order to make script working
CHAT_ID=""
BOT_TOKEN=""
DATE_EXEC="$(date "+%d %b %Y %H:%M")"
@hu553in
hu553in / docker-compose.yml
Created March 18, 2024 07:50
Dockerize go-socks5-proxy
version: '3.6'
services:
tinyproxy:
image: serjs/go-socks5-proxy
restart: unless-stopped
ports:
- 8888:1080
environment:
PROXY_USER: awesome_user
PROXY_PASSWORD: awesome_password
@hu553in
hu553in / dockerize-3x-ui.sh
Last active May 1, 2024 10:56
Dockerize 3x-ui
#!/bin/bash
set +H
# install required packages
apt-get update
apt-get -y install docker.io
# run 3x-ui Docker container
@hu553in
hu553in / install-old-chrome.sh
Last active October 23, 2024 13:55
How to download and install an old Chrome version (the Debian package)
#!/bin/bash
# required Chrome version can be found here:
# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
CHROME_VERSION=""
wget --no-check-certificate \
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
@hu553in
hu553in / http-reverse-proxy.go
Last active November 27, 2020 06:21
Dead simple HTTP reverse proxy
// Thanks to: https://siberianlaika.ru/node/29/
package main
import (
"fmt"
"net/http"
"net/http/httputil"
"net/url"
"os"
@hu553in
hu553in / github-pages-deploy.sh
Last active May 1, 2024 11:02
Bash script for easy deployment of ./build directory to GitHub Pages
#!/bin/bash
GREEN_COLOR="\033[0;32m"
NO_COLOR="\033[0m"
# variables below must be initialized in order to make script working
GITHUB_USERNAME=""
GITHUB_PAGES_REPO=""