Skip to content

Instantly share code, notes, and snippets.

View draobrehtom's full-sized avatar
😁
Suffering from idleness

Drao draobrehtom

😁
Suffering from idleness
View GitHub Profile
@t3chman
t3chman / gist:73d361645fd7a4a7f3200ecb37565d4e
Last active November 20, 2023 12:53
Cfx Lua Meta Fields - Pointer/Result Handling
Meta Fields - Pointer Handling
---------------------
The Lua runtime allows specifying pointer or result types with native execution via Meta Fields found in the `Citizen` namespace:
- PointerValueInt
- PointerValueIntInitialized
- PointerValueFloat
- PointerValueVector
- ReturnResultAnyway
--[[
Copyright 2022 ZeroDream
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
@nathanctech
nathanctech / proxy-nginx-fxserver.md
Created May 1, 2020 14:23
FXServer Reverse Proxy

Proxying FiveM Connections using Nginx

As of server version 2377, support was added to FiveM to run a custom streaming proxy similar to cfx.re, but proxying the data connection (UDP) as well. This can be accomplished very easily with nginx acting as a proxy, and you can combine the caching proxy with it.

Requirements

  • Nginx 1.17+ (1.16 absolute minimum, guide tested on 1.17)
  • Server with reasonable network bandwidth (500mbps uplink strongly suggested)
  • FXserver version 2377 or later
  • SSL certificate for the domain you're using (highly recommended)
{
"62870901": {
"HashKey": "WEAPON_SNOWLAUNCHER",
"NameGXT": "WT_SNOWLNCHR",
"DescriptionGXT": "WTD_SNOWLNCHR",
"Name": "Snowball Launcher",
"Description": "There's no greater gift than pummeling someone with rounds of festive cheer. With automatic reload, there's no time for anyone to disagree. Part of The Chop Shop.",
"Group": "GROUP_HEAVY",
"ModelHashKey": "W_LR_CompactSL_M32",
"DefaultClipSize": 20,
@alexguirre
alexguirre / Particles Effects Dump.txt
Last active April 16, 2024 05:45
GTA V Particle Effects Dump
# Thanks to CodeWalker for the code to read .ypt files: https://github.com/dexyfex/CodeWalker
#
# Format:
# [asset_name]
# effect_name_1
# effect_name_2
#
[core]
bul_gravel_heli
@matthewoden
matthewoden / AWS Git Setup.md
Created May 22, 2016 17:48
Setting up a remote Git in AWS EC2

AWS Remote Git Setup

Get a local git repo up on an EC2 Instance.

Add youself to SSH Authentication:

Add yourself to the ssh auth agent, if you haven't already.

ssh-add path/to/your/EC2.pem

Set up destination directory:

@roachhd
roachhd / README.md
Last active May 9, 2024 13:35
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@hansmaad
hansmaad / gist:9187633
Last active November 12, 2023 11:37
WPF Flat Combo Box Style
<!-- Flat ComboBox -->
<SolidColorBrush x:Key="ComboBoxNormalBorderBrush" Color="#e3e9ef" />
<SolidColorBrush x:Key="ComboBoxNormalBackgroundBrush" Color="#fff" />
<SolidColorBrush x:Key="ComboBoxDisabledForegroundBrush" Color="#888" />
<SolidColorBrush x:Key="ComboBoxDisabledBackgroundBrush" Color="#eee" />
<SolidColorBrush x:Key="ComboBoxDisabledBorderBrush" Color="#888" />
<ControlTemplate TargetType="ToggleButton" x:Key="ComboBoxToggleButtonTemplate">
<Grid>
<Grid.ColumnDefinitions>
@searbe
searbe / parse_xlsx.php
Created August 7, 2012 09:48
Parse simple XLSX in PHP with SimpleXML and ZipArchive
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/