Skip to content

Instantly share code, notes, and snippets.

View Br3nda's full-sized avatar
🦋
MAKE ALL THE THINGS

Brenda Wallace Br3nda

🦋
MAKE ALL THE THINGS
View GitHub Profile
@Br3nda
Br3nda / maya2018install.sh
Created August 18, 2022 23:51 — forked from nrtkbb/maya2018install.sh
Maya 2018 Installation on Ubuntu 18.04
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!”
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then

Copied from https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md

YMMV: Tuya likes to change their website frequently and the below instructions may be slightly out of date. If something looks wrong, please open a new issue.

Note: both methods below require that your device works with the official Tuya Smart app. If your device only works with one specific app, it almost certainly won't work with TuyAPI.

All methods below require you to install the CLI tool before proceeding.

Install it by running npm i @tuyapi/cli -g. If it returns an error, you may need to prefix the command with sudo. (Tip: using sudo to install global packages is not considered best practice. See this NPM article for some help.)

@Br3nda
Br3nda / soft_hack.md
Last active December 30, 2021 20:50 — forked from zvldz/soft_hack.md
soft_hack.md

Soft hack to open telnet

You need gateway 3(mgl03) connected to MiHome. And also ip and gateway token.

Option 1 (recommended)

Via XiaomiGateway3 component.

You must input in the 'Open Telnet command' field(as it is without changing anything):

{"method":"set_ip_info","params":{"ssid":"\"\"","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}}
#!/usr/bin/env bash
LC_ALL=C
# Place this in .git/hooks/post-checkout
local_branch="$(git rev-parse --abbrev-ref HEAD)"
if [[ $local_branch == "master" ]]
then
echo "==============================================="
@Br3nda
Br3nda / wellington-beach-poop.py
Last active December 30, 2021 21:07
Python script for poop levels at wellington beaches
#!/usr/bin/env python
from xml.etree import ElementTree
import requests
import json
import sys
import urllib
site = sys.argv[1] # e.g.'Seatoun Beach at Inglis Street',
@Br3nda
Br3nda / deploy-to-gh-pages.sh
Created January 15, 2019 21:24
Build and deploy jekyll site to gh-pages branch
#!/bin/bash
set -e
# based on https://gist.github.com/cobyism/4730490
DIST_FOLDER='_site'
PUBLISH_BRANCH='gh-pages'
REMOTE='origin'
GIT_USER=`git config user.name`

Release notes:

  • Turned off page updating - you only get the readings at the time of loading the page. Will re-instate on new PR
  • Some admin screens not done yet - will send in new PRS

Things to Test:

Self-service workflow

  • Sign up a new user
  • Confirm your email
  • Login as this new user

Number of children in a family

class number_of_children_in_family(Variable):
    value_type = int
    definition_period = MONTH
    entity = Family
    label = u"The number of children in a family"

 def formula(families, period):

Example request body

{
  "persons": {
    "Tahi": {
      "social_security__eligible_for_accommodation_supplement": {
        "2018-08": null
      },
      "age": { "2018-08": 30},
      "normally_lives_in_nz": { "2018-08": true },
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
hQIMAwDLjlflpTdnARAAjN6uINbS5QJFUEAiBeJ8eVBCF9nXSHMNYQ+hk6rinBXE
xrFDGgSHbz6BIFSTkRePewJd/p735Ou6GrTBMD1y74qGY1lpX1GWT1peRv6VkmcS
YGCE+qT6g0YlqIFLeuNoW1tnfwLUSRM3cr5mFl1BreqHP2DFhw8icjXw+3+Zb17j
GJ9B+/vP5a/pNaT9ALQXvDeWisHFPWsNs3yxGEHQ7RMPBnPq9kzOF76ObgbdgJjb
EdmtTw8U0Okm+y9EYZwU4garzzQSvdCHBrzNMA7FutJghGgLsVFWN+5qtC3lE6HR
UuyQiJg7MZx6kDuVUrAG7QtjYmvybMk1S4LBwbW/p416qL+iOBQ54xkkGagrJTro
J1mgYk/7K56cX24y0PgQ0Y93Ya/0jkvvKAFT70E8pRUw1wGjMlkSxg1sB9lxshUr