Skip to content

Instantly share code, notes, and snippets.

View arkenidar's full-sized avatar
🎯
Focusing @Elmiguys

Dario Cangialosi arkenidar

🎯
Focusing @Elmiguys
View GitHub Profile
@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
@arkenidar
arkenidar / sync_task.bash
Created March 23, 2024 15:22
sync task (from local workspace to remote filesystem). note: vice-versa is possible also (invert order of source and destination arguments and tweak them accordingly).
## add the following line ...
# source "$HOME/sync_task.bash"
## ... to "$HOME/.bashrc" (BASH initialization hidden file)
function sync_task(){
# note: vice-versa is possible also (invert order of source and destination arguments and tweak them accordingly).
rsync -zarv --delete /c/0/Dropbox/desktop [email protected]:/root && printf "\n\n *rsync-complete* \n\n"
printf "\n\n hint: type 'sync_task' to do it again \n\n"
}
@arkenidar
arkenidar / .htaccess
Last active November 29, 2023 12:07
Apache ".htaccess" configuration for e.g. Wordpress.org, UTF-8, PHP "extended" file handling (e.g. "style.css.php" as "style.css" (by PHP handler) BTW see also Sublime Text for "file.css.php" and or "file.js.php" ).
# Apache ".htaccess" configuration for e.g. Wordpress.org,
# UTF-8, PHP "extended" file handling
# (e.g. "style.css.php" as "style.css" (by PHP handler)
# BTW see also Sublime Text for "file.css.php" and or "file.js.php" ).
### https://gist.github.com/arkenidar/80e05f8bf3c3115ae802748eb6d64aca
### https://arkenidar.com/code/httpd_apache/_.htaccess
### https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/
php_value upload_max_filesize 1000M
@arkenidar
arkenidar / go-to.lua
Created September 27, 2023 19:05
not-wrong, useful and common use cases of "Lua's go-to"
--[[ "break" as key-word breaks only the inner-most loop when nesting loops ]]
--[[ "goto" to exit/break nested loops ]]
--[[ "goto" to emulate "continue" and "redo", besides "break" key-word]]
--[[ other cases possible ]]
--[[ limitation: in Lua you can "go to" only to local "goto-labels", local to the scope/function]]
local redo_limit = false
for i=1,5 do
:: redo :: -- redo as a label
@arkenidar
arkenidar / build-exec.cmd
Last active September 19, 2023 19:16
SimpleAssembler aka SASM in Ubuntu and Windows
C:/apps/simple-asm/GAS/64/as.exe pclinwin.s -o program.o --64
C:/apps/simple-asm/MinGW64/bin/gcc.exe program.o -g -o program.exe -m64
@arkenidar
arkenidar / setup-zerobrane.sh
Created September 3, 2023 14:40
[sh, git, wget] ZeroBraneStudio con *lingua italiana* attivata e menù *inserisci carattere tilde*
echo [requisiti] richiede *git* e *wget* -------------------------------
echo [1/3] ZeroBraneStudio da github -------------------------------
git clone https://github.com/pkulchenko/ZeroBraneStudio
echo [2/3] configura lingua italiana, *it* -------------------------------
printf "\n language = 'it' \n" >> ZeroBraneStudio/cfg/user.lua
echo [3/3] estensione per carattere *tilde* -------------------------------
wget https://raw.githubusercontent.com/pkulchenko/ZeroBranePackage/master/tildemenu.lua