Skip to content

Instantly share code, notes, and snippets.

View StringManolo's full-sized avatar
💭
Learning Development 24/7

StringManolo StringManolo

💭
Learning Development 24/7
View GitHub Profile
@StringManolo
StringManolo / index.html
Created August 15, 2023 20:03
Inverse border using mask
<!DOCTYPE html>
<html lang="en">
<head prefix="og:http://ogp.me/ns#">
<meta charset="utf-8">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<title>Index.html</title>
<meta property="og:type" content="website">
<meta name="theme-color" content="#ffffff">
<style>
body {
@StringManolo
StringManolo / 5um.ts
Created August 10, 2023 22:30
5um basic
import fs from 'fs/promises';
const sumBytesHexadecimal = async (inputFile: string) => {
try {
const outputFile = `${inputFile}.5um`;
const data = await fs.readFile(inputFile);
// Asegurarse de que la longitud sea múltiplo de 4
const paddedLength = Math.ceil(data.length / 4) * 4;
const paddedData = Buffer.alloc(paddedLength);
@StringManolo
StringManolo / .vimrc
Created July 28, 2023 13:11
vimscript function to add custom emmet html snippets
" Paste this code to the end of your .vimrc
" To expand my template write html:sm<tab>
" You can edit the html or create your own templates
" Add custom snippets:
function! AddHtmlSnippet(snippet)
let emmet_file = expand('~/.vim/plugged/emmet-vim/autoload/emmet.vim')
let emmet_content = readfile(emmet_file)
let start_pattern = "\\\\\\s*'html:5': \"<!DOCTYPE html>\\\\n\""
import React, { useState, useEffect } from 'react';
import { render, Text } from 'ink';
import si from 'systeminformation';
async function getCPUPercentages() {
try {
const cpuData = await si.currentLoad();
const numCores = cpuData.cpus.length;
const corePercentages = cpuData.cpus.map((core) => {
@StringManolo
StringManolo / tgbot.sh
Created July 9, 2023 18:15
Working fine?
#!/usr/bin/env bash
# TODO: Check if curl and jq are installed
# load a file into a variable
loadFile() {
local -n _result=$2;
_result=$(cat $1);
}
@StringManolo
StringManolo / tgbot.sh
Last active July 9, 2023 17:49
En desarrollo. Funcionando con echos de debug
#!/usr/bin/env bash
# TODO: Check if curl and jq are installed
# load a file into a variable
loadFile() {
local -n _result=$2;
_result=$(cat $1);
}
@StringManolo
StringManolo / tgbot.sh
Created July 9, 2023 17:08
Bot en desarrollo
#!/usr/bin/env bash
# TODO: Check if curl and jq are installed
# load a file into a variable
loadFile() {
local -n _result=$2;
_result=$(cat $1);
}