Skip to content

Instantly share code, notes, and snippets.

View burnoutprojects's full-sized avatar
Convert Caffeine Into Code

Antonis Triantafyllopoulos burnoutprojects

Convert Caffeine Into Code
View GitHub Profile
@MrGrootx
MrGrootx / updater.lua
Created July 30, 2024 01:56
check fivem resource update
local function logMessage(_type, message)
local color = _type == 'success' and '^2' or '^1'
print(('^8[GD3V]%s %s^7'):format(color, message))
end
local function checkMenuVersion()
PerformHttpRequest('https://raw.githubusercontent.com/MrGrootx/g-updates/master/g-ownable-job-vehicle.txt',
function(err, text, headers)
if err ~= 200 then
logMessage('error', 'Unable to run a version check. Error: ' .. err)
@rabindranathfv
rabindranathfv / ts-boilerplate.md
Last active May 10, 2025 22:07 — forked from silver-xu/ts-boilerplate.md
Setup a Node.js project with Typescript, ESLint, Prettier and Husky (pre-commits)

How to Setup/Configure a Node.js project with Typescript, ESLint, Prettier and Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I Forked from https://gist.github.com/silver-xu/1dcceaa14c4f0253d9637d4811948437 and customize for myself.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
/*
The MIT License (MIT)
Original work Copyright (c) 2014 Ismael Celis
Modified work Copyright 2022 Markus Bach
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@omitobi
omitobi / pre-commit-eslint
Created March 9, 2022 19:21 — forked from linhmtran168/pre-commit-eslint
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@omitobi
omitobi / connect.js
Created November 12, 2021 14:49
connect to mongo once
await mongoose.connect(dbUrl, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: false,
});
const connection = mongoose.connection;
connection.once("open", function() {
@rosshiga
rosshiga / radio.sh
Last active May 20, 2025 00:18
Radio-Pi: Bash Script to Stream Internet Radio Automatically
#!/bin/bash
# Wait for LDXE to load
sleep 5
# Stream URL
url='https://stream.revma.ihrhls.com/zc829'
# Start VLC once in the background if not already running
start_vlc_once() {
@brovish
brovish / get_gists.py
Created June 3, 2021 11:27 — forked from its-a-feature/get_gists.py
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@jeiea
jeiea / debug-scroll.md
Last active October 28, 2021 23:05 — forked from cuth/debug-scroll.md
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(() => {
  let { offsetWidth, offsetHeight } = document.documentElement;
  let walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
  while (walker.nextNode()) {
    let bound = walker.currentNode.getBoundingClientRect();
    let isWidthOverflow = bound.right > offsetWidth || bound.left < 0;
 let isHeightOverflow = bound.bottom &gt; offsetHeight || bound.top &lt; 0;
@gitdagray
gitdagray / util.js
Last active September 28, 2024 01:51
Javascript Utility Functions
// Youtube tutorial here: https://youtu.be/LDgPTw6tePk
// These functions are designed to be exported, but you could create a class instead. See tutorial video.
// #1 proper case
export const properCase = (string) => {
return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`;
};
@tbjgolden
tbjgolden / inotify-instructions.md
Last active November 27, 2024 14:22
[Arch Linux] [Manjaro] How to avoid "Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)

To avoid this error, we need to increase the inotify watcher limit.

The way to do this is different on Arch based distributions than other Linux distributions.

Instructions for Arch Linux/Manjaro

Check for an already existing inotify config file (recent versions of Manjaro include one)