Skip to content

Instantly share code, notes, and snippets.

View ufukty's full-sized avatar
👻

Ufuktan Yildirim ufukty

👻
View GitHub Profile
@ufukty
ufukty / hb.js
Created April 27, 2026 06:45
Extract filenames from HumbleBundle page as in `First author - Book title` form
copy(
[...document.querySelectorAll(".slick-slide")]
.map(
(s) =>
`${
s.querySelector(".publishers-and-developers span")?.innerText?.split(",")[0].trim()
} - ${
s.querySelector("h2")?.innerText?.trim()
}`,
)
@ufukty
ufukty / settings.json
Created March 10, 2026 21:59
VS Code disable AI
{
"chat.agent.codeBlockProgress": false,
"chat.agent.enabled": false,
"chat.agentSessionProjection.enabled": false,
"chat.agentsControl.enabled": false,
"chat.autopilot.enabled": false,
"chat.checkpoints.enabled": false,
"chat.checkpoints.showFileChanges": false,
"chat.commandCenter.enabled": false,
"chat.contextUsage.enabled": false,
@ufukty
ufukty / delete.bash
Last active June 25, 2026 13:37
Delete Cloudflare Pages deployments of a project
#!/usr/bin/env bash
: "${ACCOUNT_ID:?}"
: "${API_TOKEN:?}"
: "${PROJECT_NAME:?}"
set -eu
API="https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/pages/projects/${PROJECT_NAME}"
AUTH="Authorization: Bearer ${API_TOKEN}"
@ufukty
ufukty / labels.sh
Last active February 8, 2026 11:50
Sync labels between repositories
#!/usr/bin/env bash
# run as: ./labels.sh path/to/source/repository path/to/target/repository
# first check if this is sufficient: gh label clone owner/source-repo
# make sure you won't miss the info of issues and PRs attached to the labels the script will delete
PS4='\033[31m$0:$LINENO: \033[0m'
set -eEo pipefail
test $# -eq 2
@ufukty
ufukty / floating-ip-gateway.sh
Last active July 12, 2021 07:11 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean floating IP gateway script (force droplet to use the assigned floating IP for outbound traffic as well as inbound traffic)
#!/bin/bash
# Force outbound traffic through the attached floating IP
NET_INT="eth0"
CURL_TIMEOUT=3
echo -n "Setting floating IP as the default gateway: "
# Check there's a floating IP attached to this droplet
if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then