Skip to content

Instantly share code, notes, and snippets.

View Bumboobee's full-sized avatar
🌴
On vacation

Bumboobee

🌴
On vacation
View GitHub Profile
@Bumboobee
Bumboobee / vite.config.js
Last active July 13, 2023 10:48
Enable svg images on vite application 👾
//install the plugin dependencies
npm i vite-plugin-svgr
//on vite.config.js, add the import and the plugin reference
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
// https://vitejs.dev/config/
export default defineConfig({
@Bumboobee
Bumboobee / index.html
Last active July 13, 2023 10:43
Set title, description and webclip (ios) header
<!DOCTYPE html>
<html lang="en">
<head>
<!-- character codification -->
<meta charset="UTF-8" />
<!-- section to link the icon -->
<!-- supported by new browsers / svg files render in a better resolution on web [32x32]-->
<link rel="icon" type="image/svg+xml" href="/path_to_logo/logo.svg" />
@Bumboobee
Bumboobee / delete_dcu.pas
Last active April 10, 2023 20:08
Delete delphi dcus runtime files 👌{put it right on close form event}
procedure TfrmYourForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
SearchRec : TSearchRec;
dcuDirectory: string;
begin
try
dcuDirectory := ExtractFilePath(Application.ExeName);
FindFirst(dcuDirectory + '*.dcu', faAnyFile, SearchRec);
repeat
DeleteFile(dcuDirectory + SearchRec.name);
@Bumboobee
Bumboobee / authenticate-post.sql
Last active September 8, 2023 03:10
Call API or WebService inside SQLServer Procedure
CREATE PROCEDURE [dbo].[AUTHENTICATE]
@USER_NAME NVARCHAR(60),
@PASSWORD NVARCHAR(60),
@USER_ID INT
AS
BEGIN
DECLARE
@URL NVARCHAR(65) = 'https://{api_url}/login',
@OBJECT AS INT,
@JSON NVARCHAR(150),