Skip to content

Instantly share code, notes, and snippets.

View SupinePandora43's full-sized avatar
©️
#

SupinePandora43 SupinePandora43

©️
#
View GitHub Profile

Struct

public ref struct S {
    public S() => Console.WriteLine("Constructor");
    public void DoWork() => Console.WriteLine("*Work*");
    public void Dispose () => Console.WriteLine("Destructor");
}

upload file:

curl -X POST -H https://minecraft.curseforge.com/api/projects/PROJECTID/upload-file -u EMAIL:TOKEN -F metadata={changelog:\"curl-test\",changelogType:\"markdown\",displayName:\"Foo\",gameVersions:[157,158],releaseType:\"alpha\"} -F file=@YOURFILE

game versions:

curl -X GET https://minecraft.curseforge.com/api/game/versions -u EMAIL:TOKEN
#include <Adafruit_NeoPixel.h>
#define p 11
#define count_led 8
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(count_led,p, NEO_GRB+NEO_KHZ800);
void setup(){
pixels.begin();
pixels.show();
}
// simplest file logger in c++
#include <fstream>
//#include <iostream>
static void LOG(char* message) {
//std::cout << message << std::endl;
std::fstream fs;
fs.open("log.txt", std::fstream::in | std::fstream::out | std::fstream::app);
fs << message;
fs << "\n";
fs.close();
------------------------------------------------------
---------template by DK / Пример сделан DK------------
------------------------------------------------------
AddCSLuaFile()
local light_table = {
ModernLights = false, -- грубо говоря, ксенон или старые фары. True - ксенон, false - старые
L_HeadLampPos = Vector(-31.4, 100.4, 37.5), -- рассположение обычных фар (левых - L)
L_HeadLampAng = Angle(180, -90, 0), -- угол поворота фар