Skip to content

Instantly share code, notes, and snippets.

View arkenidar's full-sized avatar
🎯
focusing on : life

Dario Cangialosi a.k.a Arkenidar arkenidar

🎯
focusing on : life
View GitHub Profile
@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
###########################################################
@lalitshankarch
lalitshankarch / Main.cpp
Created January 19, 2024 05:28
OpenGL triangle interpolated colors code
#include <spdlog/spdlog.h>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
const char* vertShaderSource = R"(
#version 330 core
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aColor;
out vec3 vertexColor;
void main() {
@arkenidar
arkenidar / ffi-sdl.lua
Created November 11, 2022 21:11 — forked from creationix/ffi-sdl.lua
Using SDL from luajit's built-in ffi module
-- load the luajit ffi module
local ffi = require "ffi"
-- Parse the C API header
-- It's generated with:
--
-- echo '#include <SDL.h>' > stub.c
-- gcc -I /usr/include/SDL -E stub.c | grep -v '^#' > ffi_SDL.h
--
ffi.cdef(io.open('ffi_SDL.h', 'r'):read('*a'))
-- Load the shared object
@arkenidar
arkenidar / how_to_build_wlua_for_windows.md
Last active July 20, 2023 15:08 — forked from Egor-Skriptunoff/how_to_build_wlua_for_windows.md
How to build windowless* #Lua for #Windows (* meaning: no visible console for standard console output, no "console window", like pythonw.exe )

What is "windowless Lua"?

Windowless Lua does not create a console window.
It runs invisible for user.

Please note that "windowless" means "doesn't have stdin, stdout and stderr".
You will not be able to see error message.
io.read(), io.write() and print() in your Lua script will not work.
But in some situations invisible Lua is just what you need very much.
For example, to avoid a GUI application (especially a game) to lose input focus when some background Lua script is started.

@arkenidar
arkenidar / sdl2-gl.c
Created May 30, 2022 12:25
SDL2 with OpenGL for 3D (OpenGL with "windowing" requires SDL2 (or SDL1) or e.g. freeGLUT (GLUT implementation) )
// sdl2-gl.c (filename)
// SDL2 with OpenGL for 3D (OpenGL with "windowing" requires SDL2 (or SDL1) or e.g. freeGLUT (GLUT implementation) )
/* gcc sdl2-gl.c `sdl2-config --cflags --libs` -lopengl32 -lglu32 && ./a */
/*
https://www.libsdl.org/release/SDL-1.2.15/docs/html/guidevideoopengl.html ||
SDL_Delay( 30 ); // added ||
ported from SDL1 to SDL2
@arkenidar
arkenidar / echo.lua
Last active October 11, 2021 12:56 — forked from whiler/echo.lua
Simple TCP Echo Server in Lua
-- sudo luarocks install luasocket
-- sudo apt install lua-socket
local socket=require("socket")
local server=assert(socket.bind("localhost",9999))
server:settimeout(0) -- for server:accept()
local ip,port=server:getsockname()
print("ncat".." "..ip.." "..port)
@giuliohome
giuliohome / StandardShading.fragmentshader
Last active January 16, 2024 22:37
example for GTK GL Area issue
#version 330 core
// Interpolated values from the vertex shaders
in vec2 UV;
in vec3 Position_worldspace;
in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;
// Ouput data
@Egor-Skriptunoff
Egor-Skriptunoff / how_to_install_lua_and_luajit_on_windows.md
Last active July 6, 2025 14:13
How to install Lua and LuaJIT on Windows

How to install Lua and LuaJIT on 64-bit Windows

  1. Download the latest Lua and LuaJIT sources

    • Create temporary folder for Lua sources.
      I assume you would use C:\Temp\ folder.

    • Visit Lua FTP webpage and download the latest Lua source archive, currently it is lua-5.4.3.tar.gz

  • Use suitable software (7-Zip, WinRar, WinZip or TotalCommander) to unpack the archive.
@Egor-Skriptunoff
Egor-Skriptunoff / how_to_build_wlua_for_windows.md
Created May 22, 2021 22:16
How to build windowless Lua for Windows

What is "windowless Lua"?

Windowless Lua does not create a console window.
It runs invisible for user.

Please note that "windowless" means "doesn't have stdin, stdout and stderr".
You will not be able to see error message.
io.read(), io.write() and print() in your Lua script will not work.
But in some situations invisible Lua is just what you need very much.
For example, to avoid a GUI application (especially a game) to lose input focus when some background Lua script is started.

@YukiSnowy
YukiSnowy / main.cpp
Last active April 3, 2025 13:45
example SDL2 Vulkan application
// Windows
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
// Linux
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan
// https://vulkan-tutorial.com/
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>