Skip to content

Instantly share code, notes, and snippets.

View R3D9477's full-sized avatar
🤔

R3D9477 R3D9477

🤔
  • r3d9477@gmail.com
View GitHub Profile
@R3D9477
R3D9477 / install.sh
Last active November 19, 2023 10:04
Install Unreal Engine 4.27.2 Linux
#!/bin/bash
export UE4_VERSION="UnrealEngine-4.27.2-release"
export UE4_DEST_FOLDER="$HOME/Software/LinuxInstalled"
export UE4_GAME_PROJECT=""
export UE4_TOKEN=""
export UE4_ASSET_ID_SRC=""
export UE4_ASSET_ID_DEPS=""
@R3D9477
R3D9477 / std_string_split.h
Created May 11, 2021 15:10
C++ std::string split ( + remove_empty )
#pragma once
#include <vector>
#include <string>
#include <sstream>
auto split (const std::string& line, char seperator, bool remove_empty = false)
{
std::vector<std::string> strs;
@R3D9477
R3D9477 / rename_uproject.sh
Created March 29, 2021 22:27
Rename Unreal Engine's project file: $ rename_uproject.sh "/path/to/your_project.uproject" "new_name"
#!/bin/bash
if ! [ -f "$1" ] ; then exit 1 ; fi
if [ "$2" == "" ] ; then exit 2 ; fi
FULL_PATH=$(realpath "$1")
DIR_NAME=$(dirname "${FULL_PATH}")
FILE_NAME=$(basename -- "${FULL_PATH}")
BASE_NAME="${FILE_NAME%.*}"
@R3D9477
R3D9477 / 1_ue4qtcreator.txt
Last active February 17, 2021 08:44
Unreal Engine 4 C++ QtCretator short instruction
1) install qtcreator
2) install qt + desktop compilers
2) create new ue4 project (don't use white spaces in the path to project!!!)
3) add new C++ class
4) open QtCreator
5) QtCreator -> Open Project -> <path_to_ue4_project> -> [project].pro
6) QtCreator -> Projects
@R3D9477
R3D9477 / main.cpp
Last active February 17, 2021 07:46
C++ TCP Receiver
#include <iostream>
#include <unistd.h>
#include <arpa/inet.h>
#include <errno.h>
#include <string.h>
#define DEF_TCP_PORT 20197
int main()
@R3D9477
R3D9477 / main.cpp
Created February 17, 2021 07:38
C++ UDP Sender
#include <iostream>
#include <unistd.h>
#include <arpa/inet.h>
#include <errno.h>
#include <string.h>
#define SENDER_PORT 55555
#define RECEIVER_PORT 55554
#define RECEIVER_ADDR "0.0.0.0"
@R3D9477
R3D9477 / install_EGM.sh
Last active December 2, 2020 12:11
Epic Games Launcher install on Linux (wine64)
#!/bin/bash
# Note: Wine64 is needed!
sudo apt install wine64 winetricks winbind cabextract
rm -rf "$HOME/.wine64EpicGamesLauncher"
export WINEPREFIX="$HOME/.wine64EpicGamesLauncher"
export WINEARCH="win64"
winetricks d3dx9 corefonts dotnet20
@R3D9477
R3D9477 / install.sh
Last active November 26, 2020 11:41
uuu (Universal Update Utility), mfgtools 3.0 for SoM OpenRex & TinyRex
#!/bin/bash
sudo apt install wget unzip git libusb-1.0-0-dev libzip-dev libbz2-dev pkg-config cmake libssl-dev g++ -y
git clone "https://github.com/NXPmicro/mfgtools.git"
pushd "mfgtools"
wget -nc "https://www.voipac.com/downloads/imx/iMX6_OpenRex/Tools/mfgtools-Imx6Rex.zip"
unzip "mfgtools-Imx6Rex.zip"
#include <iostream>
using namespace std;
template<class T>
class BinTree
{
T _key;
bool _init;
BinTree<T> *_btLeft, *_btRight;
@R3D9477
R3D9477 / pretend_mobile_firefox.sh
Last active February 18, 2020 10:07
Pretend to be Mobile
#!/bin/bash
# Set TTL
echo 'net.ipv4.ip_default_ttl=65' | sudo tee /etc/sysctl.d/99_default_ttl.conf
sudo sysctl --system
# Set User-Agent
sed -i 's/general\.useragent\.override*//g' "$HOME/.mozilla/firefox/"*".default/prefs.js"