Skip to content

Instantly share code, notes, and snippets.

View Sanix-Darker's full-sized avatar
🐼
coding in the dark...

darker Sanix-Darker

🐼
coding in the dark...
View GitHub Profile
@Sanix-Darker
Sanix-Darker / doc.md
Created June 28, 2025 21:47
PHP 8.3 with ZTS (Zend Thread Safety) and pthreads

PHP 8.3 with ZTS (Zend Thread Safety) and pthreads

Here's an updated guide for compiling PHP 8.3 with ZTS support, which is required for pthreads or parallel extensions:

Prerequisites

sudo apt-get update
sudo apt-get install -y build-essential autoconf bison re2c \
    libxml2-dev libsqlite3-dev libssl-dev zlib1g-dev \
@Sanix-Darker
Sanix-Darker / FreeCad__SEGFAULT__solution.md
Created May 17, 2025 22:34
FreeCad Program received signal SIGSEGV, Segmentation fault FIXED.

I was trying to use FreeCad, i then downloaded the release's AppImage available for CPU arch; but i was unable to have it running on my linux machine, which specs are :

$ stackfetch ?
=== System ===
OS: ubuntu 20.04
Arch: amd64
CPUs: 8
Kernel: 5.15.0-139-generic
@Sanix-Darker
Sanix-Darker / bv1.c
Created January 5, 2025 14:27
bv1.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_MEMORY_SIZE 10
// NOTE:
// I had to print the output in stderr to not polute the /dev/stdin if i want to pipe
// to the actual intepreator :
//
@Sanix-Darker
Sanix-Darker / node-dashboard.json
Created December 22, 2024 13:29
node-dashboard.json
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
{
"__inputs": [
{
"uuid": "${datasource}",
"name": "DS_PROMETHEUS",
"label": "DS_PROMETHEUS",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
# @see /usr/include/asm-generic/errno-base.h
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
@Sanix-Darker
Sanix-Darker / mno.json
Created June 12, 2024 10:02 — forked from Jspascal/mno.json
Africa Mobile Phone Number regex
{
"om_cmr": "/^6(5[5-9]|9|8[5-9])/",
"momo_cmr": "/^6(5[1-4]|7|8[1-4])/",
"momo_civ": "/^(05)/",
"om_civ": "/^(07)/",
"moov_civ": "/^(01)/",
"wave_civ": "/^(0[157])/",
"moov_ben": "/^(9[4589]|6[03458]|5[58])/",
"moov_tgo": "/^(9[6-9]|79)/",
"tmoney": "/^(70|9[0-3])/",
@Sanix-Darker
Sanix-Darker / answerfile
Created October 29, 2023 21:32 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@Sanix-Darker
Sanix-Darker / postgres-cheatsheet.md
Created August 12, 2023 09:46 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@Sanix-Darker
Sanix-Darker / raffle.vim
Created May 15, 2023 08:46
random pick name from buffer with vimScript on vim
" vimScript
" -- On dailies, for random choice on given buffer with names
function! StringInLine(line_number, search_string)
let line_text = getline(a:line_number)
let match_position = match(line_text, a:search_string)
return match_position >= 0
endfunction
function! Raffle()
let total_lines = line('$')