Skip to content

Instantly share code, notes, and snippets.

@ArtaDante
ArtaDante / DiscordQuest.md
Last active April 30, 2024 16:40
Complete Discord Quest

Complete Recent Discord Quest

Note

Working With Discord Application

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@aneeshd
aneeshd / heating-cooling.yaml
Last active April 30, 2024 16:38 — forked from f45tb00t/heating.yaml
Home Assistant Blueprint For Heating/Cooling
blueprint:
name: Heating/Cooling Control and Window Sensor
description: Control your heating and cooling with options for group home, if temp is below
a specific value, set temp, and heating between specific times.
domain: automation
input:
state:
name: Scheduled State
description: The desired state.
selector:
@dhruvaray
dhruvaray / chatgpt_macros_bundle.md
Created April 30, 2024 15:05
Macros (for ChatGPT Memory)

command /bundle bundles the working code as a zip file for download. Users will fill in the value of the programming-language. Default value of programming-language is python. Do the following 0. create a project directory structure 1. Add context sensitive logging 2. Add exception handling 3. Follow language style standards 4. Provide a dependency file 5. Provide a build file 6. Provide detailed README.md 7. Provide a blank LICENSE file.

@S-Koell
S-Koell / exportDDL.js
Last active April 30, 2024 16:33 — forked from DominiqueComte/exportDDL.sql
export an Oracle schema DDL with SQLcl
var CopyOption = Java.type("java.nio.file.StandardCopyOption");
// put all files here >>>
var rootPathString = 'C:/Users/dump';
var pathString;
//Create Root Folder for instance.
//var instance = util.executeReturnOneCol('SELECT sys_context(\'USERENV\',\'INSTANCE_NAME\') AS Instance FROM dual');
//rootPathString = rootPathString + "/" + instance;
@krisek
krisek / alert.rules.yml
Last active April 30, 2024 16:29
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@nailton
nailton / multiexplode.php
Created March 25, 2015 16:29
Multi explode PHP
<?php
function multiexplode ($delimiters,$string) {
$ready = str_replace($delimiters, $delimiters[0], $string);
$launch = explode($delimiters[0], $ready);
return $launch;
}
// uso
$exploded = multiexplode(array(",",".","|",":"),$text);
@rishavpandey43
rishavpandey43 / git-commit-styleguide.md
Last active April 30, 2024 16:25
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 30, 2024 16:24
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory

Arch install with encrypted BTRFS (LUKS2), GRUB e AwesomeWM

My notes with the steps to install Arch Linux with encrypted BTRFS (LUKS2) and GRUB.

If you stumbled upon this document looking for a guide to install Arch Linux, I recommend checking the official installation guide on the Arch Linux Wiki: https://wiki.archlinux.org/title/Installation_guide. This is not a guide, just some notes that I'm taking while trying this setup and getting fragments of information from the internet.

@liquidev
liquidev / class.md
Last active April 30, 2024 16:24
My attempt at explaining how to implement classes in Lua

If you're reading this document, you're probably one of many people confused about how to implement OOP-like classes in Lua. But no worries! This document aims to explain all the fundamental concepts in beginner-friendly language.

Metatables

Before we start, we need to talk about metatables. These are Lua's way of allowing users to overload operators. Operators include arithmetic +, -, *, /, etc., but also things like indexing tables a[b], creating new indices in tables a[b] = c, function calls, a(b, c, d), you get the idea.

We can set the metatable of a table using setmetatable(t, metatable). The metatable is another table, that contains fields for overriding