Skip to content

Instantly share code, notes, and snippets.

@MarkWalters-dev
MarkWalters-dev / weightgurus.py
Last active October 24, 2023 21:29
Access data collected by your Greater Goods Weight Gurus scale
#!/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
# /etc/udev/rules.d/20-bt-auto-enable-a2dp.rules
# hxss
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/home/hxss/.config/scripts/xorg/bt-auto-enable-a2dp.sh"
@jwilson8767
jwilson8767 / es6-element-ready.js
Last active April 22, 2024 20:28
Wait for an element to exist. ES6, Promise, MutationObserver
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@hexedpackets
hexedpackets / pam_script_acct.py
Created July 22, 2015 16:35
Consul PAM account script for authenticating SSH users on an EC2 host based on the name of the host, as passed into the user data.
#!/usr/bin/env python
"""Authenticates a user in PAM based on the name of the current host."""
import re
import requests
import os
import sys
# using VirtualBox version $VBOX_VERSION
FROM boot2docker/boot2docker
RUN apt-get install p7zip-full
RUN mkdir -p /vboxguest && \
cd /vboxguest && \
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \
sh VBoxLinuxAdditions.run --noexec --target . && \
@hwdsl2
hwdsl2 / .MOVED.md
Last active May 4, 2024 03:19
IPsec VPN Server Auto Setup Script for Ubuntu and Debian