Skip to content

Instantly share code, notes, and snippets.

💭
clickety clack ⌨️

Sable C. sc137

💭
clickety clack ⌨️
Block or report user

Report or block sc137

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sc137
sc137 / python-tooter.py
Last active Jul 9, 2019
Python script to toot on your mastodon instance from the cli
View python-tooter.py
#!/usr/bin/env python3
# pip3 install Mastodon.py
#
# use in the python cli
# ./tooter.py "your message here"
# or just ./tooter.py to be prompted
# sable cantus
import sys
import os
@sc137
sc137 / file_integrity_check.py
Created May 15, 2019
check stored sha256 value
View file_integrity_check.py
#!/usr/bin/env python3
# file_integrity_check.py
# check file integrity from a list
# use shasum -a 256 <filename> to generate initial checksum
import hashlib
from filechecksums import * # gets precomputed variables
import os.path
def filesha256(filename, check, block_size=2**20):
@sc137
sc137 / camera_button.py
Created Sep 11, 2018
Push button camera for the AIY Vision kit
View camera_button.py
#!/usr/bin/env python3
#
# camera-button.py
#
# run this in the terminal
# push the button to take pics
# for the aiy vision kit
from gpiozero import Button
from picamera import PiCamera
@sc137
sc137 / SafeEmailTips.md
Created Apr 24, 2018
This is a document that I researched and posted for a college. Please share with your users.
View SafeEmailTips.md

Safe Email Tips

Our email inbox is a "lifeline" of sorts to the world. Email is what we use to communicate with our peers and students. It's how we send proposals and request. And how we receive assignments.

Avoiding email is not a realistic proposition as email is often our primary focus when computing. Email is a primary attack vector to our personal data and computer systems. Email based computer attacks can be especially devastating whether the attacker is a malicious person or program (virus, worm, etc.).

We would like to offer a few tips on how to email safely.

Never Share Your Password

@sc137
sc137 / makeTINY.sh
Created Mar 8, 2018
Get a tiny url from their api
View makeTINY.sh
#!/bin/sh
read -p "Enter the url to shorten: " URL
if [ ! -z $URL ]; then
shorty=`curl http://tinyurl.com/api-create.php?url=$URL`
echo $shorty
echo $shorty | pbcopy
echo "tinyurl copied to pasteboard"
View keybase.md

Keybase proof

I hereby claim:

  • I am sc137 on github.
  • I am sable (https://keybase.io/sable) on keybase.
  • I have a public key whose fingerprint is A18C 5546 1B0D B6E7 A9D3 ACCE D57E 63B5 9D2C 36E1

To claim this, I am signing this object:

@sc137
sc137 / send_o365.py
Created Feb 8, 2018
send email to one or many people now or in the future
View send_o365.py
#!/usr/local/bin/python3
#
# send_o365.py
# /sable cantus/
# http://cantus.us/
###################
"""
Use in a delay_until script to send a timed message.
@sc137
sc137 / check_o365.py
Created Feb 8, 2018
check your inbox, print subject lines, know when you need to switch over
View check_o365.py
#!/usr/local/bin/python3
#
# check_o365.py
# /sable cantus/
# http://cantus.us/
###################
"""
https://github.com/Narcolapser/python-o365
$ pip3 install O365
@sc137
sc137 / email_o365.py
Created Feb 8, 2018
send a plain text email from the terminal
View email_o365.py
#!/usr/local/bin/python3
#
# email_o365.py
# /sable cantus/
# http://cantus.us/
###################
"""
https://github.com/Narcolapser/python-o365
$ pip3 install O365
View Audio.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Audio on the Web!</title>
</head>
<body>
<h1>How do you play audio on a website?</h1>
You can’t perform that action at this time.