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 April 6, 2024 21:47
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 March 10, 2024 11:13
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

@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 April 12, 2024 18:12
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;
@zahachtah
zahachtah / vue_tabs.js
Created October 9, 2018 12:06 — forked from tiggreen/vue_tabs.js
Simple Vue.js tab navigation component with Bulma
<template>
<div class="container">
<div class="columns">
<div class="column is-12">
<div class="tabs help-tabs">
<ul>
<li :class="[ lang === 'crontab' ? 'is-active' : '']"><a @click="lang='crontab'">Crontab</a>
</li>
<li :class="[ lang === 'php' ? 'is-active' : '']"><a @click="lang='php'">PHP</a></li>
<li :class="[ lang === 'bash' ? 'is-active' : '']"><a @click="lang='bash'">Bash</a></li>