Skip to content

Instantly share code, notes, and snippets.

View bogdanbujdea's full-sized avatar
💭
Who reads this?

Bogdan Bujdea bogdanbujdea

💭
Who reads this?
View GitHub Profile
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
@scarlac
scarlac / purge_advertisers.md
Last active June 7, 2021 09:36
Facebook Hack: Purge list of "Advertisers you've interacted with"

For those of you who want to remove all in “Advertisers and Businesses” / "Who uploaded a list with your info and advertised to it":

  1. Go to https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen and open the section "Advertisers you've interacted with"
  2. Collapse all sections but keep "Advertisers and Businesses" open
  3. Open Web Inspector
  4. Copy-paste this script to load all advertisers: smt=setInterval(() => {let x=document.querySelector('div[shade=medium]'); x ? x.click() : clearInterval(smt), console.log('done')}, 1000)
  5. It will output a number. Wait for it to say “done” in the console. This may take a long time. you'll notice the scrollbar changing while it's loading all advertisers.
  6. Copy-paste this and press enter:
@AGWA
AGWA / rpi-hdmi.sh
Last active March 18, 2024 06:04
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off. X is properly reinitialized when re-enabling.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
tvservice -s | grep "TV is off" >/dev/null
}
case $1 in
@bogdanbujdea
bogdanbujdea / windows8
Last active December 18, 2015 11:38
Full share contract snippet
#region ShareContract
protected override void OnNavigatedFrom(Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
base.OnNavigatedFrom(e);
UnregisterForShare();
}
protected override void OnNavigatedTo(Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{