Skip to content

Instantly share code, notes, and snippets.

View arkenidar's full-sized avatar
🎯
focusing on : luajit-ffi-sdl3

Dario Cangialosi arkenidar

🎯
focusing on : luajit-ffi-sdl3
View GitHub Profile
@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
@arkenidar
arkenidar / MSYS-UCRT.bash
Created September 30, 2024 17:19
https://www.msys2.org/ notes about integration in Windows Terminal and Visual Studio Code
#!/usr/bin/bash
# https://www.msys2.org/ notes about integration in Windows Terminal and Visual Studio Code
# bash MSYS-UCRT.bash
# C:\msys64\usr\bin\bash.exe "C:\msys64\home\dario\MSYS-UCRT.bash"
# set MSYSTEM=UCRT64
# set CHERE_INVOKING=1
# set MSYS2_PATH_TYPE=inherit
@arkenidar
arkenidar / app-pixlet.lua
Created September 16, 2024 14:44
pixlet--lua-sdl--build-notes.txt
-- [[ app-pixlet.lua ]]
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
-- launched through "lldebugger" (ms-vscode)
require("lldebugger").start()
end
function DrawRectangle(x, y, w, h)
for px = x, x + w - 1 do
for py = y, y + h - 1 do
{ // wget https://arkenidar.com/screens/software/my-setup/settings.json
// Git for source control
"git.enabled": true,
"git.path": [
"C:/msys64/usr/bin/git.exe"
],
// vsCode terminals
"terminal.explorerKind": "integrated",
"terminal.external.windowsExec": "C:/msys64/usr/bin/bash.exe",
"terminal.integrated.profiles.windows": {
@arkenidar
arkenidar / redis-client.php
Created May 9, 2024 08:57
Using "Redis.io". Redis used as PHP session "save handler". Redis client from PHP to a Redis server.
<?php
// Redis client from PHP to a Redis server.
// https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-database-client2
// Debian setup hints:
// sudo apt install redis
// sudo apt install pkg-php-tools # provides: pecl
// sudo apt install php-dev # provides: phpize