This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local HttpService = game:GetService("HttpService") | |
local options = { | |
Url = "https://httpbin.org/post?arg=value", | |
Method = "POST", | |
Headers = {["Content-Type"] = "application/json"}, | |
Body = HttpService:JSONEncode( {this="json"} ) | |
} | |
local r = HttpService:RequestAsync(options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local rgb = Color3.fromRGB | |
local Color = { | |
Red = { | |
[50] = rgb(255, 235, 238); | |
[100] = rgb(255, 205, 210); | |
[200] = rgb(239, 154, 154); | |
[300] = rgb(229, 115, 115); | |
[400] = rgb(239, 83, 80); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local url_query = {arg1="val1", arg2="val2"} | |
local post_json = {a=1, b=2, this="is json"} | |
local HttpService = game:GetService("HttpService") | |
local options = { | |
Url = ("https://httpbin.org/post?%s=%s&%s=%s"):format("arg1", url_query.arg1, "arg2", url_query.arg2), | |
Method = "POST", | |
Headers = {["Content-Type"] = "application/json"}, | |
Body = HttpService:JSONEncode(post_json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"number": 12, | |
"string": "Hello, world!", | |
"fruits": ["apple", "pear"], | |
"person": { | |
"name": "Zach", | |
"age": 20 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
import requests | |
import figa | |
from redis import Redis | |
from pprint import pp | |
@figa.config | |
class Config: | |
default = "config.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require("discord.js"); | |
const client = new Discord.Client(); | |
client.on("ready", () => { | |
console.log("ready"); | |
}); | |
client.on("message", message => { | |
if ((message.author === client.user) && (message.content.substring(0, 2) === "%%")) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require("discord.js"); | |
const client = new Discord.Client(); | |
const config = require("./config.json"); // config from file | |
/* example config.json: | |
{ | |
"token": "abcdefghijklmnopqrstuvwxyz", // user or bot token, | |
"listenTo": ["167423382697148416", "353615025589714946", "210321071511961600"], // list of channel OR guild id's |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {v4 as uuidv4} from "uuid"; | |
import React, {createContext, ReactNode, useContext, useEffect, useMemo, useRef, useState} from "react"; | |
import clsx from "clsx"; | |
import {ClipLoader} from "react-spinners"; | |
import {useMap, useSet} from "../utils/hooks"; | |
interface IAlert { | |
id: string, | |
content?: ReactNode, // Content to display, can be string or custom children |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass, field | |
from typing import Any | |
@dataclass | |
class Feature: | |
type: str | |
id: str | |