Skip to content

Instantly share code, notes, and snippets.

View SpaghettDev's full-sized avatar
🌌
eclipsing all over the place

SpaghettDev SpaghettDev

🌌
eclipsing all over the place
View GitHub Profile
@Sainan
Sainan / stations.cpp
Last active November 14, 2024 13:28
List of radio stations that are in the wheel, in clockwise order
"RADIO_11_TALK_02", // Blaine County Radio
"RADIO_12_REGGAE", // The Blue Ark
"RADIO_13_JAZZ", // Worldwide FM
"RADIO_14_DANCE_02", // FlyLo FM
"RADIO_15_MOTOWN", // The Lowdown 9.11
"RADIO_20_THELAB", // The Lab
"RADIO_16_SILVERLAKE", // Radio Mirror Park
"RADIO_17_FUNK", // Space 103.2
"RADIO_18_90S_ROCK", // Vinewood Boulevard Radio
"RADIO_21_DLC_XM17", // Blonded Los Santos 97.8 FM
this video was created earlier in january from a stupid idea and was driven by sheer determination
despite lacking programming skill. here's a decent description of how it was made (because i am
too lazy to write a github readme):
1. the video
i downloaded the pv off youtube and used ffmpeg to resize it down to 70x54 dimensions (for easy
math calculations, i used 27 firefox windows, 7 tabs each, so it divided nicely). i then used
ffmpeg (again) to splice the source video into 15-second segments to reduce desyncing and cpu load.
2. the frames
@Sainan
Sainan / README.md
Created September 20, 2020 09:11
Make logged-out Youtube a bit more enjoyable

This is custom bypass code for Universal Bypass. If you have the extension, head into the options and insert the Javascript below into your "Custom Bypasses" section, either appending it your other custom bypasses or replacing the example code.

As for how this makes logged-out Youtube more enjoyable:

  • Automatically closes the "please log in because Google is so great" pop-ups
  • Allows you to watch age-restricted videos without logging in (SFW Example)
/*
0x7FEAD38B326B9F74 (GET_PED_AMMO_TYPE_FROM_WEAPON) returns the current ammo type (means MK2 weapon magazines change the returned value)
0xF489B44DD5AF4BD9 (_GET_PED_AMMO_TYPE_FROM_WEAPON_2) returns the base ammo type
*/
enum eAmmoType
{
AMMO_PISTOL = 0x743D4F54,
AMMO_SMG = 0x6C7D23B8,
AMMO_RIFLE = 0xD05319F,
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@bmaupin
bmaupin / free-backend-hosting.md
Last active November 13, 2024 02:37
Free backend hosting
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active November 8, 2024 20:02
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th