Skip to content

Instantly share code, notes, and snippets.

View fragtion's full-sized avatar

Dimitri Pappas fragtion

  • Johannesburg, South Africa
View GitHub Profile
@fragtion
fragtion / 0x0000007Bfix
Created February 2, 2023 02:11
0x0000007B fix
First inject drivers: https://gist.github.com/TomCan/9644966
Change to AHCI mode from IDE mode:
You can use the MS Fix it tool or edit the registry yourself.
Link to tool here: http://support.microsoft.com/kb/922976/
Regedit:
1. Exit all Windows-based programs.
2. Press [Win] + R or take the RUN option from the start menu.
3. Now type Regedit there and press Enter Key to open up the Registry Editor Window. (If you receive the User Account Control dialog box, click Continue.)
4. Locate and then click the following registry sub key:
@fragtion
fragtion / gist:56e1d50d19015612bd6327f9522679b4
Created August 19, 2023 02:14
vmware-fix-physicaldrive-error
The operation on file \\.\PhysicalDrive failed ...
Fix:
1) Physical disk should be offline in the host OS.
2) Clear readonly attribute with diskpart
```
diskpart
list disk
select disk 5
@fragtion
fragtion / configuration.yml
Created September 24, 2023 01:52
leetify-cs2-stats-home-assistant
sensor:
- platform: rest
name: leetify
resource: https://api.leetify.com/api/profile/76561197990921651 #replace the profile id with your own profile id, from eg: https://api.leetify.com/api/profile/76561197990921651
json_attributes:
- games
- recentGameRatings
value_template: 'OK'
scan_interval: 600
- platform: template
@fragtion
fragtion / fix-intel-brightness.txt
Last active December 17, 2023 22:20
Fix Intel Adaptive Brightness
Intel have introduced a "feature" for computers/laptops with Intel Graphics Adapters, that automatically adjusts the brightness/contrast
of your screen depending on the image being shown on the display
Furthermore, they have removed the option to disable this functionality when the system is running on AC power (in other words, when not
running on battery). I was not able to find it in "Intel Graphics Settings" control panel, or the "Intel® Graphics Command Center"
downloaded from the Mirosoft Store (not even the Beta version).
The problem is, this "feature" seems to work in a counter-intuitive way: When there is dark (more black) content shown on the screen,
the brightness is DIMMED, and when there is mostly light content (more white), the brightness increases! The brightness adjustment is
not instant, but takes a few seconds - so some people may not even notice the effect.
@fragtion
fragtion / gist:a86ef3d19e75134f8f360f0bc3476293
Created December 17, 2023 22:57
MacBookPro Disable startup chime
Source: https://apple.stackexchange.com/questions/458195/how-to-disable-startup-chime-on-macbook-pro-5-2-2009
`OK after spending countless hours on this, I finally figured it out. And in the end, I didn't even need Mac OS X for it.
Boot into Ubuntu, open a terminal window and issue the following commands:
sudo rm /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
printf "\x07\x00\x00\x00\x00" > ~/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
sudo cp ~/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82 /sys/firmware/efi/efivars
And yes, deleting and then creating and copying the var back to /sys/efi/efivars was the ONLY method that worked. Attempting to write
@fragtion
fragtion / gist:74497d279d05bb47dba9f7be83c90c43
Last active February 15, 2024 20:52
MAC Address troubleshooting (unicast, broadcast, multicast)
To validate that any MAC address is unicast, simply confirm that the second character of the mac address (ie, the second character of the first octet, specifically speaking) is one of 0,2,4,8,A,C,E
for example
02:00:00:00:00
04:00:00:00:00
0A:00:00:00:00
0E:00:00:00:00
E2:00:00:00:00
F2:00:00:00:00
F2:00:00:00:00