Skip to content

Instantly share code, notes, and snippets.

View wilyJ80's full-sized avatar
💭
🍪

Victor Hugo wilyJ80

💭
🍪
View GitHub Profile
@wilyJ80
wilyJ80 / compose.yaml
Created August 5, 2025 17:05
Gitea compose
---
# This is an example complete example docker-compose.yml
# file for a linuxserver.io based BookStack setup
# using the linuxserver.io MariaDB conatiner.
# ENSURE YOU PAY ATTENTION TO ALL COMMENTS BELOW.
# Many of the values are just examples, and you WILL
# have to make changes to suit your environment.
@wilyJ80
wilyJ80 / app.ini
Created August 4, 2025 19:34
app.ini Gitea with sqlite wal mode
; This file lists the default values used by Gitea
;; Copy required sections to your own app.ini (default is custom/conf/app.ini)
;; and modify as needed.
;; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes.
;; If you don't know what a setting is you should not set it.
;;
;; see https://docs.gitea.com/administration/config-cheat-sheet for additional documentation.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@wilyJ80
wilyJ80 / read.c
Created June 18, 2025 11:36
beginners guide away from scanf
/* https://web.archive.org/web/20250417094758/https://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
int main(void)
{
long a;
char buf[1024]; // use 1KiB just to be sure
@wilyJ80
wilyJ80 / pom.xml
Created June 9, 2025 13:11
Spring MVC + Standalone Tailwind CLI
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
@wilyJ80
wilyJ80 / pom.xml
Created June 9, 2025 12:07
Pom XML for fat JAR + CLI program before compile
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>exectest</groupId>
<artifactId>exectest</artifactId>
<version>1.0-SNAPSHOT</version>
<name>exectest</name>
@wilyJ80
wilyJ80 / blinkrotate.ino
Created May 30, 2025 01:16
OOP button with states
#define RED_PIN 2
#define YELLOW_PIN 3
#define BUTTON_PIN 4
struct Sketch {
int status;
int cur;
int prev;
void (*resetPins)(struct Sketch *self);
void (*rotateState)(struct Sketch *self);
@wilyJ80
wilyJ80 / main.c
Last active April 3, 2025 13:13
Half adder (CLI args)
#include <stdio.h>
#include <stdlib.h>
#include "./utils.h"
int main(int argc, char** argv) {
if (argc != 3) {
fprintf(stderr, "Error: expected 2 args (numbers)\n");
exit(EXIT_FAILURE);
}
@wilyJ80
wilyJ80 / search.sql
Last active May 20, 2025 18:32
FB db text search utils
set term ^ ;
execute block
returns (
RESULT1 varchar(255), RESULT2 varchar(255),
RESULT3 BLOB, result4 varchar(255) )
as
declare search_query varchar(32) = 'PAC';
BEGIN
@wilyJ80
wilyJ80 / test.ino
Created March 9, 2025 17:30
global string test
/*******************************************************************
A telegram bot for your ESP32 that demonstrates a bot
that show bot action message
Parts:
ESP32 D1 Mini style Dev board* - http://s.click.aliexpress.com/e/C6ds4my
(or any ESP32 board)
= Affilate
@wilyJ80
wilyJ80 / migration.js
Created February 28, 2025 13:18
connect-pg-simple cookie table in node-pg-migrate syntax
exports.shorthands = undefined;
exports.up = (pgm) => {
pgm.createTable("session", {
sid: { type: "varchar", notNull: true, primaryKey: true },
sess: { type: "json", notNull: true },
expire: { type: "timestamp(6)", notNull: true },
});
pgm.createIndex("session", "expire", { name: "IDX_session_expire" });