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
@OnniSaarni
OnniSaarni / fikaserver.md
Last active May 28, 2024 19:43
SPT MPT/Fika Server With Docker Ubuntu/Debian/Raspberry Pi
@raisabelatrix
raisabelatrix / rainbow-tags.css
Last active January 17, 2024 12:38
Obsidian 1.0+ snippet for rainbow-colored tags. Comes with style settings option
/* ——————————————————————————————————————————— ╗
                 STYLE SETTINGS
╚ ——————————————————————————————————————————— */
/* @settings
name: Rainbow Tags by raisabelatrix
id: rb-tags-rsbltrx
settings:
-
id: rainbow-tags
@rabindranathfv
rabindranathfv / ts-boilerplate.md
Last active August 23, 2023 09:35 — 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() {
@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 February 8, 2024 14:15
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 April 6, 2024 07:13
[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)

@chgsantos
chgsantos / docker-compose.yml
Created September 30, 2020 21:32
Gitlab Runner - docker-compose v2
version: '2'
services:
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind