Skip to content

Instantly share code, notes, and snippets.

View zr0n's full-sized avatar

Luiz Fernando zr0n

View GitHub Profile
#include "ldlidar_driver.h"
#include <iostream>
#include <cstring>
#include <unistd.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <pigpio.h>
const int PORT = 8080;
const int BUFFER_SIZE = 1024;
import socket
SERVER_HOST = "127.0.0.1" # Endereço do servidor C++
SERVER_PORT = 8080 # Porta do servidor C++
# Criação do socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Conexão ao servidor C++
client_socket.connect((SERVER_HOST, SERVER_PORT))
/**
* @file main.cpp
* @author LDRobot (support@ldrobot.com)
* @brief main process App
* This code is only applicable to LDROBOT LiDAR LD06 products
* sold by Shenzhen LDROBOT Co., LTD
* @version 0.1
* @date 2021-10-28
*
* @copyright Copyright (c) 2021 SHENZHEN LDROBOT CO., LTD. All rights
#define POINT_PER_PACK 12
#define HEADER 0x54
#define SERIAL_BUFFER_SIZE 256 // Ajuste o tamanho conforme necessário
typedef struct __attribute__((packed)) {
uint16_t distance;
uint8_t intensity;
} LidarPointStructDef;
typedef struct __attribute__((packed)) {

Using Plastic Version Control: A Step-by-Step Tutorial (Graphical Interface)

Plastic SCM provides a user-friendly graphical interface to help you manage and track changes to your source code efficiently. In this tutorial, we'll cover the basics of how to use the Plastic SCM graphical interface to perform commits, lock files, get changes, and push new changes in your Plastic repository.

Prerequisites

  1. Plastic SCM installed on your system.
  2. A Plastic SCM repository ready for use.
  3. Basic familiarity with the Plastic SCM graphical interface.
@echo off
SET "ProjectPath=%~dp0"
SET "EnginePath=F:\UnrealEngine"
call "%EnginePath%\Engine\Build\BatchFiles\Build.bat" -project="%ProjectPath%\Cigars.uproject" -Target="CigarsEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development" -Quiet -WaitMutex -FromMsBuild"
call "%EnginePath%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -nocompileeditor -nop4 -project="%ProjectPath%\Cigars.uproject" -cook -stage -package -iterate -clientconfig=Development -ue4exe="%EnginePath%\Engine\Binaries\Win64\UE4Editor-Cmd.exe" -pak -targetplatform=PS4 -build -utf8output -verbose -cookmapsonly -FastCook -compressed -archive -archivedirectory="%ProjectPath%\Archive" -trace="cpu,gpu,frame"
/Users/Shared/Epic\ Games/UE_5.1/Engine/Build/BatchFiles/RunUAT.sh -ScriptsForProject=/Users/starloop/Downloads/Portal/MobileArcade.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=/Users/starloop/Downloads/Portal/MobileArcade.uproject -cook -stage -archive -archivedirectory=/Users/starloop/Downloads/Portal/Build -package -clientconfig=Development -compressed -SkipCookingEditorContent -pak -prereqs -distribution -targetplatform=IOS -build -CrashReporter -utf8output
#!/bin/bash
max_attempts=2
attempt=1
file_to_check="seu_arquivo.txt"
while [ $attempt -le $max_attempts ]; do
if [ -e "$file_to_check" ]; then
echo "Arquivo encontrado. Deletando..."
rm "$file_to_check"
@zr0n
zr0n / DeleteIgnoredFiles.cs
Created June 8, 2023 23:43
Delete git ignored files from folder considering wildcards
using System;
using System.IO;
using System.Diagnostics;
using System.Linq;
using System.Diagnostics;
class Program
{
static void Main()
{
rm /Users/starloop/PocketDimensions/Content/Genx/Rapt0r/Rapt0r_BrainShell_HW.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Rapt0r/Rapt0r_Arm_PV.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Rapt0r/Materials/Rapt0r_Body_GD.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Pollu/Pollu_Body_BBO.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Pollu/Materials/Pollu_Deltoid_M7.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Pollu/Materials/Pollu_BrainShell_GL.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Pollu/Materials/Pollu_Arm_NFI.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Omnimaton/Omnimaton_Deltoid_HW.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Omnimaton/Omnimaton_Body_OG.uasset
rm /Users/starloop/PocketDimensions/Content/Genx/Pollu/GeoGroups/Pollu_BrainShell_H.uasset