Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
#!/bin/sh | |
dig myip.opendns.com @resolver1.opendns.com +short |
#!/usr/bin/env python | |
import time | |
import signal | |
import math | |
import scrollphathd | |
from envirophat import light, motion, weather | |
""" |
# µPing (MicroPing) for MicroPython | |
# copyright (c) 2018 Shawwwn <[email protected]> | |
# License: MIT | |
# Internet Checksum Algorithm | |
# Author: Olav Morken | |
# https://github.com/olavmrk/python-ping/blob/master/ping.py | |
# @data: bytes | |
def checksum(data): | |
if len(data) & 0x1: # Odd number of bytes |
# Step 1: open terminal. | |
# Step 2: nano ~/.bash_profile | |
# Step 3: Add the following code below | |
alias my-ip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2' | |
# Step 4: save file and restart terminal. |
import streamlit as st | |
import streamlit.components.v1 as components | |
def left_callback(): | |
st.write('Left button was clicked') | |
def right_callback(): | |
st.write('Right button was clicked') |
const TELEGRAM_BOT_TOKEN = '110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw'; // https://core.telegram.org/bots#creating-a-new-bot | |
export const verifyTelegramWebAppData = async (telegramInitData: string): boolean => { | |
// The data is a query string, which is composed of a series of field-value pairs. | |
const encoded = decodeURIComponent(telegramInitData); | |
// HMAC-SHA-256 signature of the bot's token with the constant string WebAppData used as a key. | |
const secret = crypto |
This will require the umqtt.simple library on the PicoW,
You can install this with upip by running:
import upip
upip.install('umqtt.simple')
If you use a public MQTT broker such as test.mosquitto.org
you should change the prefix value in line 8 of the micropython from MYNAME
to something unique or you may recieve other peoples commands
# I'll be doing another one for Linux, but this one will give you | |
# a pop up notification and sound alert (using the built-in sounds for macOS) | |
# Requires https://github.com/caarlos0/timer to be installed | |
# Mac setup for pomo | |
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\ | |
-title 'Work Timer is up! Take a Break 😊'\ | |
-appIcon '~/Pictures/pumpkin.png'\ | |
-sound Crystal" |