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 { useEffect, useRef, useState } from "react"; | |
export interface DivSize { | |
width: number; | |
height: number; | |
} | |
interface ResponsiveDivSizeReturn { | |
divRef: React.RefObject<HTMLDivElement>; | |
divSize: DivSize; |
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
extends Node | |
#TREES | |
const OAK_TREE = "O" | |
#ORES | |
const GOLD_ORE = "G" | |
const SILVER_ORE = "S" | |
const TIN_ORE = "T" |
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
extends Node | |
var si = ServerInterface | |
class_name Serializer | |
# Packet description from server to client. Default type is ENTITY_ID | |
static func get_server_client_descriptor(): | |
var server_to_client_packet_descriptor = { | |
ServerInterface.Opcodes.TAKE_DAMAGE : |
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 | |
read -p 'Which c file to watch?: ' file_name | |
read -p 'Which gcc flags? Type them all with a space between: ' opt_flags | |
old_file_sig=$(stat -c %Z $file_name) | |
echo "Watching $file_name for changes..." | |
while true | |
do | |
new_file_sig=$(stat -c %Z $file_name) | |
if [[ "$new_file_sig" != "$old_file_sig" ]]; then | |
echo "" |
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
{ | |
"0": { | |
"amount": 1, | |
"item_id": 41 | |
}, | |
"1": { | |
"amount": 1, | |
"item_id": 42 | |
}, | |
"2": { |
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
#configs - loaded from cfg file | |
var tcp_listen_port_m : int = 9999 setget m_nosetter | |
var max_tcp_conns_m : int = 1000 setget m_nosetter | |
var tcp_conn_timeout_ms_m : int = 2000 setget m_nosetter | |
var db_hostname_m : String = "localhost" setget m_nosetter | |
var query_timeout_sec_m : int = 2 setget m_nosetter | |
var db_max_conns_m : int = 50 setget m_nosetter | |
var db_conns_bfr_cnt_m : int = 2 setget m_nosetter | |
var allowed_login_attempts_m : int = 3 setget m_nosetter |