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 | |
set -euxo pipefail | |
dwpage='https://www.minecraft.net/en-us/download/server/bedrock/' | |
dwregx='https://minecraft.azureedge.net/bin-win/bedrock-server-.*?.zip' | |
url=$(curl "$dwpage" | grep -oP "$dwregx") | |
curl -o bds.zip -L "$url" |
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
ip rule add fwmark 0x233 lookup 100 | |
ip route add local 0.0.0.0/0 dev lo table 100 |
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 | |
set -euxo pipefail | |
kernel="${kernel:-kernel}" | |
initrd="${initrd:-initramfs.cpio.gz}" | |
target="$1" | |
shift | |
nsroot -xpf -- qemu-system-x86_64 \ | |
-enable-kvm \ | |
-m 1G \ | |
-smp 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
#include <chrono> | |
#include <iostream> | |
#include <random> | |
#include <sqlite3.h> | |
int loadOrSaveDb(sqlite3 *pInMemory, const char *zFilename, bool isSave) { | |
int rc; /* Function return code */ | |
sqlite3 *pFile; /* Database connection opened on zFilename */ | |
sqlite3_backup *pBackup; /* Backup object used to copy data */ |
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
function(init_user_prop prop) | |
if(${prop}) | |
set(ENV{_${prop}} "${${prop}}") | |
else() | |
set(${prop} "$ENV{_${prop}}" PARENT_SCOPE) | |
endif() | |
endfunction() | |
function(generate_winsdk_vfs_overlay winsdk_include_dir output_path) | |
set(include_dirs) |
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
#pragma once | |
#ifndef __GNUC__ | |
# error This header only works in GCC | |
#endif | |
#ifdef __clang__ | |
# ifndef __ccls__ | |
# warning This header may not working in clang | |
# endif |
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
declare module 'picogl' { | |
enum GL { | |
DEPTH_BUFFER_BIT = 0x00000100, | |
STENCIL_BUFFER_BIT = 0x00000400, | |
COLOR_BUFFER_BIT = 0x00004000, | |
POINTS = 0x0000, | |
LINES = 0x0001, | |
LINE_LOOP = 0x0002, | |
LINE_STRIP = 0x0003, | |
TRIANGLES = 0x0004, |
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 | |
rm -rf contents.json | |
temp=$(mktemp) | |
trap "rm -rf $temp" EXIT | |
find -type f | sed 's/^.\//path=/' | parallel jo | jo -a | sed 's/^/content=/' > $temp | |
echo "version=1" >> $temp | |
cat $temp | jo -p >> contents.json |
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 | |
set -euo pipefail | |
url_cobblestone="https://hertz.services/docker/codehz/cobblestone/0" | |
url_bds="https://hertz.services/docker/codehz/bds/0" | |
url_nsgod="https://hertz.services/github/codehz/nsgod/latest/nsgod" | |
mkdir -p .cobblestone/{core,game} | |
tempdir=$(mktemp -d) | |
echo "[+] created temp directory: ${tempdir}" |
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
#!/usr/bin/env node | |
const constants = require("./constants.js"); | |
const api = require("stoneapi-js"); | |
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
api.init(); | |
api.attach(); | |
const channels = constants.channels; |