Skip to content

Instantly share code, notes, and snippets.

View ronilaukkarinen's full-sized avatar
🔥
on fire! 🔥🔥🔥

Roni Laukkarinen ronilaukkarinen

🔥
on fire! 🔥🔥🔥
View GitHub Profile
@padajo
padajo / untick_twitter_ad_settings.js
Last active July 21, 2024 16:40
Basic js to untick all twitter ad settings
/*
* To untick all the "personalised interests" that are used for ad targeting on twitter
* you go to this page:
*
* https://twitter.com/settings/your_twitter_data/twitter_interests
*
* Go to the inspector and run this code and it should untick all the ticked boxes
* in the list. You can change the interval to less than 650ms. You need a delay
* or the twitter API thinks you're trying to overload it.
*
@tylerhunt
tylerhunt / README.md
Created March 30, 2021 18:26
Generates a 2FA QR code for Instagram.

Instagram 2FA QR Code Generator

Instagram doesn’t make it easy to enable 2FA unless you’re using Google Authenticator or Duo Security. If you want to use it with another authenticator app—like 1Password—this script will generate the QR code you need to easily set that up.

Usage

The Ruby script makes use of Bundler’s inline functionality and will automatically install the depenedncies as system gems.

ruby qr.rb
@ssledz
ssledz / asus-bt400-linux-install.md
Last active June 29, 2024 13:43
Linux Installation guide for Asus USB-BT400

Download driver

curl 'https://dlcdnets.asus.com/pub/ASUS/wireless/USB-BT400/DR_USB_BT400_1201710_Windows.zip' \
  -o bt400-driver.zip

Driver & tools for bt400 can be found here

Find out what is a filename for your driver

Plug device and do

@coolaj86
coolaj86 / Create a Bootable MacOS Recovery USB with Linux.md
Last active July 22, 2024 20:06
How to create Apple's Bootable MacOS Rescue Image from Linux

See bootableinstaller.com

How to create a Bootable MacOS Recovery USB from Linux

If your Mac is out-of-order or you otherwise cannot download macOS from the App Store, you can still create a bootable OS X recovery USB, and you can use that to create an Installer USB.

The downloads used in this process are legal and freely avaliable - including disk images directly from Apple's IT support pages, and open source utilities for extracting and converting pkg, dmg, and HFS+.

@rizalp
rizalp / phpbuild.md
Last active March 21, 2023 11:23
[Build PHP 8] Minimal Build PHP 8.2.4, linked with sqlite3 from source on Ubuntu 22.04 And Macos #php #sqlite3 #ubuntu22.04
@AngeloFaella
AngeloFaella / scraper.py
Last active October 13, 2021 09:39
Python Amazon Scraper: simple python script to get notified (via email) when the price of a certain product falls below a certain threshold. Full explanation here: https://levelup.gitconnected.com/simple-web-scraping-with-python-1692c11e3b1a
from bs4 import BeautifulSoup
import requests
import smtplib
def check_price() -> int:
# get HTML page
user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'
headers = {"user-agent": user_agent}
req = requests.get(URL, headers=headers)
@them-es
them-es / functions.php
Last active September 26, 2023 09:52
Make Polylang compatible with the WP-API. Query language specific WP-API posts via a parameter and add the post language as a new REST field.
<?php
/**
* https://developer.wordpress.org/reference/hooks/rest_this-post_type_query
*
* Query language specific posts via "lang" parameter: /wp-json/wp/v2/posts?lang=en
*/
function my_theme_filter_rest_post_query( $args, $request ) {
$lang_parameter = $request->get_param('lang');
@fnky
fnky / variable-fonts.md
Last active June 15, 2024 04:38
Awesome Variable Fonts

Awesome Variable Fonts

A list of open source and free* variable fonts.

* Some fonts may require a license to be used for commerical use.

Open Source

@Loriowar
Loriowar / sidekiq@.service
Last active May 14, 2023 13:02
Systemd unit for multiprocess sidekiq. Based on example unit from official sidekiq page on GitHub.
# https://github.com/mperham/sidekiq/blob/master/examples/systemd/sidekiq.service
#
# systemd unit file for CentOS 7, Ubuntu 15.04
#
# Customize this file based on your bundler location, app directory, etc.
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
@psaikali
psaikali / acf-gravity-forms-field.php
Created January 4, 2019 13:43
Populate ACF select field options with Gravity Forms to select a specific form
<?php
/**
* Populate ACF select field options with Gravity Forms forms
*/
function acf_populate_gf_forms_ids( $field ) {
if ( class_exists( 'GFFormsModel' ) ) {
$choices = [];
foreach ( \GFFormsModel::get_forms() as $form ) {
$choices[ $form->id ] = $form->title;