Skip to content

Instantly share code, notes, and snippets.

@gtasnail
gtasnail / pedResetFlags.lua
Created April 11, 2024 22:45
All known ped reset config flags | SetPedResetFlag SET_PED_RESET_FLAG |
PRF_DisablePlayerJumping = 46, -- Disable jumping
PRF_DisablePlayerVaulting = 47, -- Disable climbing / vaulting
PRF_AllowUpdateIfNoCollisionLoaded = 55, -- Don't freeze this ped for not having bounds loaded around it
PRF_DisableSecondaryAnimationTasks = 58, -- Disable upper body animtion tasks such as shove ped and open door anims
PRF_SearchForClosestDoor = 60, -- Will check for the closest door in proximity and store it off
PRF_SupressGunfireEvents = 62, -- Supresses AI generating fire events, so civilians wont be shocked or react, for use in a shooting range for example
PRF_InfiniteStamina = 63, -- Currently just for mounts, but could be expanded to anything with stamina
PRF_BlockWeaponReactionsUnlessDead = 64, -- Stops the ped from reacting to damage events (such as shots / fires, etc). The ped will still take damage while this flag is active. Note: this does not block explosion reactions.
PRF_ForcePlayerFiring = 65, -- Forces player to fire even if they aren't pressing fire
PRF_For
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 30, 2024 11:40 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@alfredlucero
alfredlucero / index.d.ts
Last active April 30, 2024 11:40
Cypress Tips/Tricks - Typing Task Plugin Functions
// Can import types from other files using TypeScript's typed imports functionality
type BlocksDto = import("../plugins/Suppressions/setup").BlocksDto;
// Or you can define the types here as well in this type definition file
type ApiHost = "https://staging.api.com" | "https://testing.api.com" | string;
declare namespace Cypress {
interface Cypress {
// ...environment variables
}
package main
import (
"log"
"time"
"github.com/labstack/echo/v5"
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/apis"
"github.com/pocketbase/pocketbase/core"
using System.Net.WebSockets;
using System.Text;
Uri uri = new("wss://yabu.me/");
using ClientWebSocket ws = new();
await ws.ConnectAsync(uri, default);
var req = "[\"REQ\", \"_\", {\"kinds\": [1], \"limit\": 10}]";
Console.WriteLine("< " + req);
@Hakkadaikon
Hakkadaikon / NostrSubscription.cs
Created April 29, 2024 15:22
NostrSubscriptionCSharp
class NostrSubscription
{
static void Main(string[] args)
{
string url = "wss://yabu.me";
using (var ws = new WebSocketSharp.WebSocket(url))
{
ws.OnOpen += (sender, e) =>
{
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 30, 2024 11:34
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@olange
olange / sendAllDrafts.vba
Last active April 30, 2024 11:34
Sends all draft e-mails from a specific Outlook folder
Option Explicit
Private Const VERSION As String = "0.1"
Private Const DIALOG_TITLE As String = "yourModuleName › SendAllDrafts (v" & VERSION & ")"
' Name of the subfolder of the Drafts folder, containing the draft e-mails to be sent
Private Const MAILMERGE_SUBFOLDER_NAME = "MailMerge"
' Send all messages from the MAILMERGE_SUBFOLDER_NAME subfolder
' of the Drafts folder (ignores any subfolder)
@mwhite
mwhite / git-aliases.md
Last active April 30, 2024 11:32
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@alexchexes
alexchexes / chatgpt_ui_fix.user.js
Last active April 30, 2024 11:28
ChatGPT web-interface width fix (and other UI improvements)
// ==UserScript==
// @name ChatGPT CSS fixes
// @version 2024-02-11
// @updateURL https://gist.github.com/alexchexes/d2ff0b9137aa3ac9de8b0448138125ce/raw/chatgpt_ui_fix.user.js
// @downloadURL https://gist.github.com/alexchexes/d2ff0b9137aa3ac9de8b0448138125ce/raw/chatgpt_ui_fix.user.js
// @namespace http://tampermonkey.net/
// @description Adjusts width of side bar and messages of the chatGPT web interface
// @author alexchexes
// @match https://chat.openai.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com