Skip to content

Instantly share code, notes, and snippets.

@aidik
aidik / holiday-game.md
Created October 8, 2024 11:28
Holiday Adventure Planning Game

Holiday Adventure Planning Game

Objective:

Enhance English language skills by collaborating to create a unique holiday plan based on provided data, and practice speaking and presenting in English.


Materials Needed:

@aidik
aidik / npub
Created September 24, 2024 21:54
npub
npub1ajdaw3j4g6aqv86alhn3df8jpulj0mxz3jjgwpm4uh598hc348gqthdt20
@aidik
aidik / Nostr NIP-05 Nginx Only Configuration.md
Last active July 20, 2023 14:53
A simple way how to serve multiple NIP-05 Identifiers using only Nginx

Nostr NIP-05 specification makes it a bit harder to serve identifiers from a simple webserver without CGI to run an external program handling the name URL query parameter. I really didn't want to do all that, so instead I focused on how to handle everything just in Nginx itself.

Prerequisite

  • A server with Nginx responding to basic requests. (minimal configuration should be enough)

Config

Inside the http block insert map and map_hash_bucket_size directives:

map_hash_bucket_size 256;

map $arg_name $nostr_key {

@aidik
aidik / Query
Last active January 24, 2022 17:20 — forked from lukecav/Query
Improved MySQL/Maria script to get all WooCommerce orders including more metadata and better data types
SELECT `p`.`id` AS `order_id`,
Cast(`p`.`post_date` AS datetime) AS `order_date`,
SUBSTRING(`p`.`post_status`, 4) AS `order_status`,
Max(CASE WHEN `pm`.`meta_key` = '_billing_email' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `billing_email`,
Max(CASE WHEN `pm`.`meta_key` = '_billing_first_name' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `_billing_first_name`,
Max(CASE WHEN `pm`.`meta_key` = '_billing_last_name' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `_billing_last_name`,
Max(CASE WHEN `pm`.`meta_key` = '_billing_company' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end) AS `_billing_company`,
Max(CASE WHEN `pm`.`meta_key` = '_billing_address_1' AND `p`.`id` = `pm`.`post_id` THEN `pm`.`meta_value` end)
@aidik
aidik / PowerDNS: Trigger SOA serial increase in all zones
Created September 30, 2019 13:47
PowerDNS: Trigger SOA serial increase in all zones
pdnsutil list-all-zones | xargs -L1 pdnsutil increase-serial
var names = "";
jQuery(".pokemon-family-container").find("h2").not('.main-title').each( function () {
names += jQuery( this ).text();
});
console.log( names );
@aidik
aidik / command.md
Created July 6, 2019 19:08
curl ssh public key from GitHub to authorized_keys

mkdir -m 700 ~/.ssh; curl https://github.com/aidik.keys >> ~/.ssh/authorized_keys

@aidik
aidik / Rsync Photo
Created February 9, 2019 00:57
Rsync Photo
rsync -ribP --suffix ".old" --checksum --remove-source-files
@aidik
aidik / getShowURLs.js
Last active January 23, 2019 15:56
ČeskáTelevize - Get show URLs
var output = "";
jQuery(".episodes-broadcast-content a")
.each(function(a, b) {
output = output + ("https://www.ceskatelevize.cz" + jQuery(b).attr("href") + "\n");
})
.promise().done(function() {
console.log(output);
});
@aidik
aidik / encode.sh
Created June 6, 2018 14:13 — forked from mikoim/README.md
YouTube recommended encoding settings on ffmpeg (+ libx264)
#/bin/sh
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output