Skip to content

Instantly share code, notes, and snippets.

View wilyJ80's full-sized avatar
💭
🍪

Victor Hugo wilyJ80

💭
🍪
View GitHub Profile
@wilyJ80
wilyJ80 / command.sh
Last active November 23, 2025 14:27
Move most recent download to desired directory
ls -dt ~/Downloads/* | head -n1 | xargs cp -t docs/opcionai
s/ambiente-de-negocios-e-marketing/pellegrino/material-estudo/
# BETTER:
# cp "$(ls -td ~/Downloads/* | head -n1)" docs/opcionais/ambiente-de-negocios-e-marketing/pellegrino/material-estudo/
@wilyJ80
wilyJ80 / log.sh
Last active November 23, 2025 13:46
COMMIT ANALYTICS: get your commit count and most recent commits on all your PC! Add to .bash_profile and open the output file in your browser (optionally add a bookmark)
#!/bin/bash
SRC_FOLDER="$HOME/src"
COMMITTER_PATTERN="git|victor.bitencourt|wilyJ80"
DEST_FOLDER="$HOME/logs/log.html"
TOP=$(cat << EOF
<head>
<style>
body {
@wilyJ80
wilyJ80 / PLATFORMIO.md
Last active October 21, 2025 23:29
CLANGD + ARDUINO + PLATFORMIO
  1. Select board and generate project
  2. Add dependencies to platformio.ini
  3. Generate compile_commands.json with pio run -t compiledb
  4. Check if there are any errors in a sketch with #include <Arduino.h> related to compiler flags
  5. Ignore them in the .clangd configuration file:
CompileFlags:
  # Remove the flags that clangd doesn't understand
  Remove:
@wilyJ80
wilyJ80 / MainActivity.java
Created October 2, 2025 13:16
Android geolocation permissions
package com.example.myapplication;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.widget.Button;
import android.widget.TextView;
@wilyJ80
wilyJ80 / MainActivity.java
Last active September 21, 2025 00:20
Copyright Notice XML View
package com.example.myapplication;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
@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>