Skip to content

Instantly share code, notes, and snippets.

View arkenidar's full-sized avatar
🎯

Dario Cangialosi arkenidar

🎯
View GitHub Profile
@arkenidar
arkenidar / switch.c
Created May 6, 2026 21:21
[select] about conditional branching especially selection-branching
// c language : libraries
#include <stdio.h>
#include <string.h>
// handle cases : definitions of cases
enum Kind { Kind1, Kind2, Kind3, LastKindCount };
const char* const KindArray[LastKindCount] = { "Kind1", "Kind2", "Kind3"};
// c language : program entry-point
int main(){
@arkenidar
arkenidar / funcs.lua
Created April 15, 2026 10:59
in Lua , show some "functional paradigm" paradigm-patterns ( such as "partial application" and "closures" ) and a Lua Module design-pattern
local M = {}
function M.somma(a,b)
return a + b
end
function M.prodotto(a,b)
return a * b
end
@arkenidar
arkenidar / .htaccess
Last active July 14, 2025 18:38
/var/www/arkenidar.com/.htaccess
# .htaccess file for arkenidar.com
# This file is used to configure Apache web server settings for the arkenidar.com domain.
# It includes rules for URL rewriting, directory listings, and file handling.
# It is placed in the root directory of the website to apply these settings globally.
# Note: This file is not used for the arkenidar.com/var directory, which has its own .htaccess file.
###########################################################
# main handling of the site
###########################################################
@arkenidar
arkenidar / WAP.ASM
Last active June 6, 2025 21:27
TASM 5.0 -- https://winworldpc.com/product/turbo-assembler/5x -- TURBO ASSEMBLER 5.0 -- TASM 5.0 -- WAP.ASM : Windows Application Example in Assembly
; Copyright (c) 1993 by Borland International, Inc.
;
; * Borland Turbo Assembler 4.0 *
;
; * Windows Application Example in Assembly *
;
; This example (WAP.ASM) will put up a window and beep when the
; right mouse button is pressed. When the left mouse button is
; pressed, it will put up a message box.
;
@arkenidar
arkenidar / bag.md
Created May 5, 2025 21:17
[bag] lang-tech : language techniques

bag

Python bag

In Python, there isn't a built-in "bag" data type like there is in some other programming languages. However, you can achieve similar functionality using the collections.Counter class, which is part of the collections module. A Counter is essentially a dictionary for counting hashable objects. Here's a brief overview of how you can use it:

Example 1: Basic Usage

from collections import Counter
@arkenidar
arkenidar / set.md
Created May 5, 2025 19:51
lang-tech : language techniques

set

Python set

# Using curly braces
my_set = {1, 2, 3, 4}
my_set.add(5)
my_set.remove(3)
@arkenidar
arkenidar / enum.md
Created May 5, 2025 18:52
lang-tech : language techniques
@arkenidar
arkenidar / debian-iso.bash
Created February 12, 2025 13:41
bash scripts for setup and/or setup-related textual notes
#!/usr/bin/env bash
open https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/SHA512SUMS
wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/SHA512SUMS.sign
export ISO=debian-live-12.9.0-amd64-kde
# file $ISO.iso
### https://gist.github.com/
### VPS: LINODE : nanode (DEBIAN)
Host arkenidar
HostName arkenidar.com
User arkenidar
IdentityFile ~/.ssh/id_ed25519
Host root
@arkenidar
arkenidar / 000-default-le-ssl.conf
Created October 3, 2024 17:15
server-side configuration snippets ( as documentation , quite safe to share , no secrets here , as backup too )
#### ssh arkenidar.com "cat /etc/apache2/sites-enabled/000-default-le-ssl.conf" > apache-site.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this