Skip to content

Instantly share code, notes, and snippets.

View hu553in's full-sized avatar
🌋
Living

Ruslan Khasanshin hu553in

🌋
Living
View GitHub Profile
@hu553in
hu553in / todoist_to_rss.go
Last active November 17, 2025 09:33
Yandex Cloud function to get RSS feed built from Todoist tasks with "rss" label
package main
import (
"context"
"encoding/json"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"os"
@hu553in
hu553in / ci.yml
Last active November 17, 2025 09:33
GitHub Actions to build iOS app
variables:
APP_NAME: MyAwesomeApp
name: CI
on:
push:
branches:
- main
tags:
@hu553in
hu553in / headphones.sh
Last active November 17, 2025 09:33
Bash script to re-connect Bluetooth headphones on Linux via bluetoothctl and PulseAudio
#!/usr/bin/env bash
set -euo pipefail
DEVICE_MAC="41:42:DB:A9:E6:8D"
DEVICE_MAC_UNDERSCORE="${DEVICE_MAC//:/_}"
TIMEOUT=60
GREEN="\033[0;32m"
RED="\033[0;31m"
@hu553in
hu553in / ssh_login_notification.sh
Last active November 17, 2025 09:33
Send Telegram notification about SSH login
#!/usr/bin/env bash
set -euo pipefail
# File must be stored in /etc/profile.d.
# Variables below must be filled.
CHAT_ID=""
BOT_TOKEN=""
@hu553in
hu553in / build.gradle
Last active November 17, 2025 09:33
Gradle script for publishing JAR to GitLab package registry with custom POM file building
// Uses Gradle internal API - works on Gradle 7.6
import groovy.json.JsonSlurper
import org.gradle.api.internal.tasks.userinput.NonInteractiveUserInputHandler
import org.gradle.api.internal.tasks.userinput.UserInputHandler
plugins {
id 'maven-publish'
}
@stackunderflow111
stackunderflow111 / build.gradle.kts
Last active October 14, 2025 19:26
Integrate Jooq with Testcontainers and Flyway
import nu.studer.gradle.jooq.JooqGenerate
import org.flywaydb.core.Flyway
import org.flywaydb.core.api.configuration.FluentConfiguration
import org.jooq.meta.jaxb.Configuration
import org.testcontainers.containers.JdbcDatabaseContainer
import org.testcontainers.containers.PostgreSQLContainer
import org.testcontainers.utility.DockerImageName
plugins {
id("nu.studer.jooq") version "7.1.1"
@hu553in
hu553in / install_old_chrome.sh
Last active November 17, 2025 09:33
How to download and install an old Chrome version (the Debian package)
#!/usr/bin/env bash
set -euo pipefail
# 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 \
@hu553in
hu553in / http_reverse_proxy.go
Last active November 17, 2025 09:33
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 November 17, 2025 09:33
Bash script for easy deployment of ./build directory to GitHub Pages
#!/usr/bin/env bash
# Variables below must be initialized.
set -euo pipefail
GREEN_COLOR="\033[0;32m"
NO_COLOR="\033[0m"
GITHUB_USERNAME=""
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active December 9, 2025 18:37
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example