This file contains hidden or 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 lastSentMessage = os.epoch() -- last time a message was sent in ms | |
function sendDiscordMessage(message) | |
local url = '' | |
local headers = { | |
['Content-Type'] = 'application/json', | |
} | |
local data = { | |
content = message | |
} |
This file contains hidden or 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
## Discord Alert Script | |
# This script sends a message to a Discord channel using a webhook. | |
## Usage | |
# ./discord_alert.sh "<message>" | |
## Example | |
# ./failing_task.sh || ./discord_alert.sh "Example Task failed..." | |
## CONFIG | |
DISCORD_WEBHOOK=<discord_webhook_url> | |
USER_ID=<your_user_id> # USER TO NOTIFY |
This file contains hidden or 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
#!/bin/bash | |
# Define paths | |
MODS_DIR="./mods" | |
BACKUP_DIR="./backup" | |
MRPACK_URL="$1" # Replace with your actual Modrinth .mrpack URL | |
TEMP_DIR="./temp" # Temporary directory to unzip the .mrpack file | |
# Create the backup directory if it doesn't exist | |
rm -rf "$TEMP_DIR" # Remove any existing temp directory |
This file contains hidden or 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 this after importing all of bulma | |
// add responsive spacing helpers | |
@each $property, | |
$shortcut in $spacing-shortcuts { | |
@each $name, | |
$value in $spacing-values { | |
// All directions |
This file contains hidden or 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
<?php | |
// CONFIG | |
$override_title = null; //set overide title to use instead of directory name | |
// END CONFIG | |
?> | |
<?php |
This file contains hidden or 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
# Get new tags from remote | |
git fetch --tags | |
# Get latest tag name | |
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) | |
# Checkout latest tag | |
git checkout $latestTag |
This file contains hidden or 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
public class ExampleUsage : UdonSharpBehaviour { | |
public void OnGameFinished() { | |
// determine the winner somehow up here | |
VRCSDKBaseVRCPlayerApi wiwnner = ... | |
// find the winner and run the teleport command on them | |
for (var i = 0; i < networkManager.playerIds.Length; i++) | |
{ | |
if (networkManager.playerIds[i] == winner.playerId) { | |
networkManager.clients[i].SendCustomNetworkEvent(NetworkEventTarget.Owner, "TeleportPlayerToSpawn"); |
This file contains hidden or 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
export interface Vector2 { | |
x: number | |
y: number | |
} | |
const distance = (a: Vector2, b: Vector2): number => | |
Math.sqrt((b.x - a.x) ** 2 + (b.y - a.y) ** 2) | |
const subtract = (b: Vector2, a: Vector2): Vector2 => { | |
return { x: b.x - a.x, y: b.y - a.y } |
This file contains hidden or 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
// Option 1: Import the entire three.js core library. | |
import * as THREE from 'three'; | |
import { BoxBufferGeometry, Mesh, MeshPhongMaterial } from 'three'; | |
import { BoxLineGeometry } from 'three/examples/jsm/geometries/BoxLineGeometry.js'; | |
import { VRButton } from 'three/examples/jsm/webxr/VRButton.js'; | |
import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory.js'; | |
let DB; |
This file contains hidden or 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 width --amount of trees wide of the tree farm | |
local length --amount of tree length of the tree farm | |
local treeDistance --the distance of blocks between | |
local sleepTime --the amount of time between the turtle checking the tree farm for grown trees | |
local pos --current distance from the starting point | |
local direction --current direction turtle is facing | |
local function fuelCheck() | |
if turtle.getFuelLevel() == 0 then | |
for i=1,15,1 do |