Skip to content

Instantly share code, notes, and snippets.

View staciax's full-sized avatar

STACiA staciax

View GitHub Profile
@lopspower
lopspower / README.md
Last active May 31, 2024 12:19
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@silkyland
silkyland / strToThaiSlug.js
Last active May 20, 2024 01:32
Convert string to slug in Thai language for SEO Friendly in JavaScript
/**
* Translates a string to a Thai slug format.
* @param {string} inputString - The string to translate.
* @returns {string} The translated string.
*/
function toThaiSlug(inputString) {
// Replace spaces with hyphens
let slug = inputString.replace(/\s+/g, '-');
// Translate some characters to Thai
@igorjs
igorjs / rest-api-response-format.md
Last active May 26, 2024 19:03
REST API response format based on some of the best practices
@sgdan
sgdan / dockerignore-test.sh
Created May 11, 2019 23:58
Test the ".dockerignore" file to ensure the build context doesn't contain unwanted files
#!/bin/sh
# Based on BMitch's answer from:
# https://stackoverflow.com/questions/38946683/how-to-test-dockerignore-file
# Note: will create and delete temporary file "Dockerfile.build-context"
# 1. Copy to project folder where image is being built
# 2. Run script
# 3. You should see list of files in build context
@Kavan72
Kavan72 / endpoints.txt
Last active June 1, 2024 08:10
Valorant endpoints
[PlayerFeedback_CheckForSurvey] POST
[PlayerFeedback_SendAnswers] POST
[PatchNotes_GetPatchNotes] GET
[AggStats_Fetch] GET
[AccountXP_GetPlayer] GET https://pd.ap.a.pvp.net/account-xp/v1/players/{user_id}
[Config_FetchConfig] GET https://shared.ap.a.pvp.net/v1/config/ap
@Soheab
Soheab / wait_for_modal.md
Last active January 13, 2024 11:57
See how to wait for user input using a modal!

Wait for with a Modal

See here an overcomplicated way to wait for input from a user using a modal. Every step is explained using comments.

This is meant to replace Client.wait_for("message") for application commands.

Features

  • Easy way to construct a Modal with one text input field.
  • Easily pass a check from the constructor

Files

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 31, 2024 10:02
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

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

Warning

There are now two quest types ("stream" and "play")! Pay attention to the instructions!