Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / programas.md
Created July 13, 2023 20:10
Programas para hacer diagramas entidad relación
@bcambl
bcambl / podman-pihole.sh
Created May 15, 2022 04:06
pihole in a container with podman on fedora
#!/usr/bin/env bash
# Fedora 35 VM using libvirt on Fedora 36 workstation
# Clean OS install with with user account 'admin' created with administrator privileges
# turning off firewalld for testing purposes
# refer to firewall-cmd documentation to configure firewall ports on container host
sudo systemctl stop firewalld
sudo dnf install -y podman-compose
mkdir -p /home/admin/pihole/etc-pihole
@CatalanCabbage
CatalanCabbage / dvsj-in-about-you.tsx
Created February 15, 2024 06:46
WIP, about you component that gets data from your browser and eerily shows your data
import React, {useEffect, useRef, useState} from 'react';
import './About.css';
let textOptions = {
cookieEnabled: {
true: '',
false: 'You\'ve turned cookies off? Wow. ',
}, platform: {
win: 'Chillin\' on your Windows'
}, deviceMemory : {
@eNV25
eNV25 / hp-bios-update.md
Last active May 2, 2024 17:24
Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

To update the BIOS/UEFI firmware requires HP-specific files in the EFI System Partition, also referred to as ESP.

On a Linux system, the ESP is typically mounted on /boot/efi or /efi. Whithin you should also find a EFI directory, e.g. /boot/efi/EFI or /efi/EFI. This article assumes that the ESP is mounted on /efi and that the /efi/EFI directory exists. You can replace that with the mount point your system uses.

The HP-specific files are located in /efi/EFI/HP or /efi/EFI/Hewlet-Packard. These files typically come preinstalled in HP Windows PCs. If you have these files you could skip Install HP-specific files.

@eYinka
eYinka / tailwind-radial-progress-bar.txt
Last active May 2, 2024 17:20
Tailwind CSS Radial Progress Bar
// Inspired by Tailwind Daisy UI progress bar: https://daisyui.com/components/radial-progress/
// This is a custom-made progress circular/radial progress bar with centered percentage text.
// Tested with Tailwind 3.x. Should work with lower versions of Tailwind CSS as well.
STEP 1: Add the following custom CSS:
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
transform: rotate(-90deg);
transform-origin: 50% 50%;
@Voloshin-Sergei
Voloshin-Sergei / commit.md
Created November 3, 2020 13:10
Шпаргалка по оформлению коммитов

Требования к именам коммитов

  • Названия коммитов должны быть согласно гайдлайну
  • Должен использоваться present tense ("add feature" not "added feature")
  • Должен использоваться imperative mood ("move cursor to..." not "moves cursor to...")

Примеры имен коммитов

init: - используется для начала проекта/таска. Примеры:
  • init: start youtube-task
  • init: start mentor-dashboard task
@JamesDunne
JamesDunne / i2c.c
Last active May 2, 2024 17:20
C library for reading/writing I2C slave device registers from Raspberry Pi 1 Model B
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
// Terrible portability hack between arm-linux-gnueabihf-gcc on Mac OS X and native gcc on raspbian.
#ifndef I2C_M_RD
#include <linux/i2c.h>
#endif
@ThakurSarveshGit
ThakurSarveshGit / BoilerplateMultiThreading.cpp
Last active May 2, 2024 17:19
Boiler plate code for Multithreading camera(s) for faster FPS. Check writeup here:
/*
* Boilerplate code for handling cameras for computer vision tasks.
* Date Created: 2/4/2020
* Author: Sarvesh Thakur
*/
#include "Interaction.h"
@ramonfincken
ramonfincken / WooCommerce_search_order_ip.php
Last active May 2, 2024 17:18
Add search by customer IP address to Woocommerce order search
<?php
// NOTE, see updates function managedwphosting_woocommerce_order_query_args
/**
* Inspired by https://stackoverflow.com/questions/53140009/add-search-by-customer-ip-address-to-woocommerce-order-search
* Code idea borrowed from https://www.skyverge.com/blog/filtering-woocommerce-orders/ && https://gist.github.com/bekarice/41bce677437cb8f312ed77e9f226a812
*/
add_filter( 'request', 'filter_orders_by_payment_method_query' );
function filter_orders_by_payment_method_query( $vars ) {
@metatablecat
metatablecat / b64.lua
Last active May 2, 2024 17:26
The fastest luau base64 library in the west. This has been benchmarked within Roblox Luau, results may vary
local SEQ = {
[0] = "A", "B", "C", "D", "E", "F", "G", "H",
"I", "J", "K", "L", "M", "N", "O", "P",
"Q", "R", "S", "T", "U", "V", "W", "X",
"Y", "Z", "a", "b", "c", "d", "e", "f",
"g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "0", "1", "2", "3",
"4", "5", "6", "7", "8", "9", "+", "/",
}