This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# So I asked Greater Goods if they would point me in the direction of their API. So I could get data | |
# from their WiFi scale without the limitations of their Weight Gurus app. They said they don't give | |
# that out. So my options are to return the scale to Amazon because it is useless to me without an | |
# API or I figure it out myself. Anyway, I figured it out so you don't have to return your scale. | |
# This isn't an API but from here you can atleast access the data. | |
# If you don't already have the scale you can find it on Amazon | |
# UPC 875011003964 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -xe | |
cat jpbd.sh | |
docker image ls -a | |
docker container ls -a | |
git clone https://github.com/jedie/pybee-docker.git | |
cd pybee-docker | |
./pull.sh | |
./build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All commands tested with termux. With slight modifications they will also work from adb shell. | |
remount root | |
------------ | |
su # tsu won't work with this | |
mount -o rw,remount /system_root | |
mount -o ro,remount /system_root | |
change hostname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# pip has 2 options for downloading chrome extensions. cedl and chrome-webstore-download | |
# cedl has a more recent update than chrome-webstore-download | |
# but cedl polutes ~/bin by downloading to ~/bin/chrome-extensions so it is not an option without fixing that anti-feature | |
# chrome-webstore-download downloads to the current directory but requires -u|--url which is annoying but has the | |
# option to save to a custom filename with -f|--file which could come in handy | |
# | |
# This little script uses chrome-webstore-download to download and extract a chrome extension | |
# | |
# Example: crxdl https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export BASHLOG=$HOME/.local/share/bashlog | |
[ -e "$BASHLOG" ] || mkdir -p $BASHLOG | |
[ -n "$TERM_SESSION_ID" ] || export TERM_SESSION_ID="$(uuidgen)" | |
export PROMPT_COMMAND='echo "$(printf "%(%F.%H:%M:%S)T\n") $TERM_SESSION_ID $PWD $(history 1)" >> $BASHLOG/$(printf "%(%F)T\n").log' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run this from inside a repo container | |
# After starting your repo with "machinectl start repo" you can create new containers offline using: | |
# mkosi -d centos_epel -r 8 --mirror=http://centos.repo.lan --hostname=cheese -o /var/lib/machines/cheese | |
# I have "10.1.1.2 centos.repo.lan" in /etc/hosts | |
# mkosi also needs to be manually patched to disable gpg checking. No flag for it as of today. | |
# Also no usable flags to disable all repos. --repositories='!*' does not work yet. | |
# So I have to make a lot of symlinks to prevent it from failing. | |
WEBROOT=/var/www/html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Parially copied from https://stackoverflow.com/questions/37318999/multiprocess-queue-in-bash | |
# Requires: nc, tee, grep, and bash | |
# | |
# Example usage: | |
# urlqueue -s | |
# urlqueue https://www.youtube.com/watch?v=J5cnM1ODU0Y | |
# urlqueue -q -p | while read -r URL # read until end of list | |
# do | |
# youtube-dl $URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Moses Narrow <[email protected]> | |
# Co-Maintainer: Felix Golatofski <[email protected]> | |
# Contributor: Mark Weiman <[email protected]> | |
# Contributor: Johannes Dewender arch at JonnyJD dot net | |
# Contributor: Tony Lambiris <[email protected]> | |
pkgbase=apt | |
pkgname=('apt' 'apt-docs') | |
pkgver=2.2.0 | |
pkgrel=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
""" | |
Description: Qutebrowser userscript. Allows you to download and watch a youtube video | |
Keyboard binding: config.bind("\\", 'hint all userscript watchyt.py') | |
Config file location: ~/.config/qutebrowser/config.py | |
Script file location: ~/.local/share/qutebrowser/userscripts/watchyt.py | |
Manually set keybinding: :bind \ hint all userscript watchyt.py | |
Usage: Press \ then the hint keys for the video you wish to watch. | |
You must select the video title not the image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# echo version, requires sudo | |
echo 0 off > /proc/acpi/ibm/led # power button led | |
echo 10 off > /proc/acpi/ibm/led # lid led | |
echo 0 > /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness # mic mute led | |
echo 0 > /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness # mute led | |
echo 0 > /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness # wifi led | |
# echo version with sudo | |
sudo bash -c " | |
echo 0 off > /proc/acpi/ibm/led # power button led |
OlderNewer