Skip to content

Instantly share code, notes, and snippets.

@singhofmarco
singhofmarco / BaseDataTable.php
Created March 6, 2020 17:04
Lazy export of DataTable
<?php
namespace App\DataTables;
use Yajra\DataTables\Html\Button;
use Yajra\DataTables\Services\DataTable;
class BaseDataTable extends DataTable
{
protected $exportClass = LazyDataTablesExportHandler::class;
@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:
@radicaldingos
radicaldingos / Vagrantfile
Last active April 10, 2024 15:13
Example of Vagrantfile with config stored in an external YAML file. It looks for a "vagrant.yml.dist" file, which can be overloaded by a "vagrant.yml".
# encoding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
# Load settings from vagrant.yml or vagrant.yml.dist
current_dir = File.dirname(File.expand_path(__FILE__))
if File.file?("#{current_dir}/vagrant.yml")
config_file = YAML.load_file("#{current_dir}/vagrant.yml")