Skip to content

Instantly share code, notes, and snippets.

View Thraka's full-sized avatar
💭
Andy De Deorge

Andy De George Thraka

💭
Andy De Deorge
  • Microsoft Corporation
  • Monroe, Wa
View GitHub Profile
@Thraka
Thraka / SD_x11vnc-install.sh
Created September 24, 2022 15:57 — forked from muzzol/SD_x11vnc-install.sh
script for installing x11vnc on Steam Deck
#!/bin/bash
# script for installing x11vnc on Steam Deck
# ATENTION: USE IT AT YOUR OWN RISK!!!!
#
# this will modify root filesystem so it will probably get
# overwrite on system updates but is totally ok executing
# it several times, so if something stops working just
# launch it again
#

Facebook

  • Block "People you may know"

    ##div[data-testid^="Keycommand_wrapper_feed_story"]:has(span:has-text(/People You May Know/))

    Facebook decided to try and prevent adblockers, so this is the new rule:

@Thraka
Thraka / readme.md
Created November 13, 2019 19:00
SpriteBatching for SFML and C# - Built for SadConsole

The Reset method confgures the drawing routine for the specific render target and tarnsform. The DrawQuad call will batch a sprite as long as the texture doesn't change. Once a DrawQuad call is made where there is a new texture, the End method is called which dumps the current buffer into the engine draw to get data on the screen and then the buffer pointer is reset to 0.

If the buffer is set for 1000 verticies, which gives you 250 sprite draws. However, there is an internal limit set at 800 (200 sprites) that once the batcher hits this, the buffer is resized by a small percentage and the internal limit raised. This ensures you never reach the limit of sprites and it grows as much as needed. The sprite draws just mentioned are only for batching. You have 200 batch draws of the same texture until it starts growing. Remember, as soon as you change sprite texture, the batcher restarts.

This code was written for SadConsole; I tried to clean this up as much as possible to make it generic. Hope it helps.

@Thraka
Thraka / prep-vmss.sh
Last active April 6, 2017 18:48
Prep for Azure vmss
#!/bin/bash
# Setup the data disk
(echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk /dev/sdc
fdisk /dev/sdc
mkfs -t ext4 /dev/sdc1
mkdir /datadrive
mount /dev/sdc1 /datadrive
exit 0