Skip to content

Instantly share code, notes, and snippets.

@brbsix
brbsix / pyqt5_scraper.py
Created June 18, 2016 05:21
PyQt5 Scraper (Basic Example)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Sample scraper script
See: https://impythonist.wordpress.com/2015/01/06/ultimate-guide-for-scraping-javascript-rendered-web-pages/
"""
# standard imports
import sys
{
"fallback": [
{ "class_name": "com.google.android.libraries.youtube.player.background.BackgroundTransitioner", "method_name": "updateBackgroundService", "actions": [
{ "name": "set_field_boolean_before_method", "field_name": "playbackModality.isInBackground", "value": true }
] },
{ "class_name": "com.google.android.libraries.youtube.innertube.model.PlayabilityStatusModel", "method_name": "isPlayable", "actions": [
{ "name": "set_field_boolean_before_method", "field_name": "isBackgroundable", "value": true }
] },
{ "class_name": "com.google.android.apps.youtube.app.background.BackgroundSettings", "method_name": "getBackgroundAudioSetting", "actions": [
{ "name": "return_string", "value": "on" }
@brbsix
brbsix / shellcheck-install.sh
Created September 17, 2020 07:01
Install shellcheck on Termux
#!/bin/bash
#
# Install shellcheck
set -euo pipefail
# resynchronize the package index
apt-get -qq update
# install QEMU Linux user mode emulator (and jq)
@brbsix
brbsix / send_or_receive.sh
Created January 22, 2021 00:48
send_or_receive.sh
#!/bin/bash
#
# Send or receive data to/from another device on the network.
PROGRAM=${0##*/}
LOCAL_IP=192.168.1.100
PORT=6666
PASSWORD=topsecret
@brbsix
brbsix / fzf.sh
Last active July 9, 2023 01:44
Configure fzf
#!/bin/bash
#
# Configure fzf
# Set up fzf tab completion
. /usr/share/fzf/completion.bash
# Set up fzf key bindings
. /usr/share/fzf/key-bindings.bash