Skip to content

Instantly share code, notes, and snippets.

View DRFR0ST's full-sized avatar
🏑
Not on vacation

Mike Eling DRFR0ST

🏑
Not on vacation
View GitHub Profile
@DRFR0ST
DRFR0ST / checkFileContentPeriodically.md
Last active January 2, 2025 13:16
A Bun/Node.js script that monitors a given URL for file content changes, notifying the user with console output when changes are detected.

️ File Change Monitor Script (Node.js & Bun)

This script keeps an eye on a file hosted online and alerts you whenever its content changes!

Features:

  • Cross-platform: Works on both Windows πŸͺŸ and Linux/Mac systems!
  • No external dependencies: No need to install extra libraries
  • Robust error handling: Handles network issues and non-200 status codes
  • Clear notifications: Shows both old and new content for easy comparison
(()=>{"use strict";const t=document.querySelector("#sharefox-embed-script"),e=document.querySelectorAll(".sharefox-embed");for(const o of e){const e=o.getAttribute("data-shop")||t?.getAttribute("data-shop"),s=o.getAttribute("data-path"),a=t?.getAttribute("data-hostname")||`https://${e}.mysharefox.com`,n=new URL(`${a}/embeds/${s}`);if("product"===s){const t=o.getAttribute("data-id"),e=o.getAttribute("data-slug");if(!t){console.error("Missing data-id attribute for product embed.");continue}if(!e){console.error("Missing data-slug attribute for product embed.");continue}n.searchParams.append("id",t),n.searchParams.append("slug",e)}else if("products-popular"===s){const t=o.getAttribute("data-volume");t&&n.searchParams.append("volume",t)}else if("search-advanced"===s||"search"===s){const t=o.getAttribute("data-products-path")||"products";n.searchParams.append("productsPath",t)}const i=o.getAttribute("id"),d=document.createElement("iframe");d.setAttribute("id",i||r()),d.setAttribute("src",n.toString());const u=o.get
@DRFR0ST
DRFR0ST / COMMIT_CONVENTION.md
Created June 7, 2022 09:05
Commit convention

Commit convention

How to create commits

In our project, we create commits in an orderly way, using emoji for this and start the commit content with a capital letter. The commit body complements β€žthis commit will...". For example: ":lipstick: Fix main container height"

List of emojis that we use

| Text | Image | GFM shortcode* | Windows 10 picker name | When to use it |

import React, { useContext, useRef } from 'react';
import { ImageStyle, TextStyle, useColorScheme, ViewStyle } from 'react-native';
import { Theme } from 'tint-n-tinge';
import { useSignal } from './hooks';
type PaletteRaw = {
primary: string;
background: string;
text: string;
};
REACT_APP_BASENAME=/
REACT_APP_FIREBASE_APIKEY=AIzaSyA_AUH-zsM6ecOoWFeEKdYRQ-w64nWz3zA
REACT_APP_FIREBASE_AUTHDOMAIN=ping-82fee.firebaseapp.com
REACT_APP_FIREBASE_DATABASEURL=https://ping-82fee.firebaseio.com
REACT_APP_FIREBASE_PROJECTID=ping-82fee
REACT_APP_FIREBASE_STORAGEBUCKET=ping-82fee.appspot.com
REACT_APP_FIREBASE_MESSAGINGSENDERID=262343699619
REACT_APP_FIREBASE_APPID=1:262343699619:web:9b197e44a89eb579376316
REACT_APP_FIREBASE_MEASUREMENTID=G-Q9S8PDHJDP
src
β”œβ”€β”€ api
β”‚ β”œβ”€β”€ auth.ts
β”‚ β”œβ”€β”€ client.ts
β”‚ β”œβ”€β”€ commands.ts
β”‚ β”œβ”€β”€ fcm.ts
β”‚ β”œβ”€β”€ hooks.ts
β”‚ β”œβ”€β”€ messages.ts
β”‚ └── utils.ts
β”œβ”€β”€ assets
{"v":"5.2.1","fr":60,"ip":0,"op":600,"w":1920,"h":1080,"nm":"1c","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 67","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[56.509,58.327,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[23.636,23.636,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0]],"o":[[0,0]],"v":[[1122,506]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.721568627451,0.721568627451,0.721568627451,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a"
@DRFR0ST
DRFR0ST / fleet.json
Last active September 26, 2020 22:35
macrents.pl fleet
[
{
"id": "skoda-rapid-01",
"available": true,
"visible": true,
"description": {
"de_DE": [
"Czujniki parkowania, kamera cofania, podrzewane fotele, zestaw gΕ‚oΕ›nomΓ³wiΔ…cy, SmartLink"
],
"en_US": [
Intel(R) HD Graphics 520
Report Date: Sunday, July 19, 2020
Report Time [hh:mm:ss]: 2:54:22 PM
Driver Version: 22.20.16.4785
Operating System: Windows* 10 Pro (10.0.19041)
Physical Memory: 16204 MB
@DRFR0ST
DRFR0ST / stadia_mobile.js
Created May 23, 2020 11:41
πŸ•ΉοΈ Enable controller for Stadia on mobile devices. (In chrome browser)
javascript:gg = navigator.getGamepads; navigator.getGamepads = function(){ g = gg.apply(navigator); if (g[0] !== null) { g0 = {}; for(var property in g[0]){g0[property] = g[0][property]}; g0.mapping="standard"; return [g0, null, null, null]}; return g; }