Skip to content

Instantly share code, notes, and snippets.

View andkon's full-sized avatar
🤠

Andrew Konoff andkon

🤠
View GitHub Profile
@andkon
andkon / statusblinker.py
Created April 25, 2018 22:29
Site Status Blink1 Script
from blink1.blink1 import Blink1
import requests
import time
"""
I run this with a bash script, `something.sh`, which just runs it, and which will catch any errors that it can then email to me:
python3.6 statusblinker.py
"""
b1 = Blink1()
import requests
from pytz import timezone
from datetime import datetime
from twilio.rest import Client
import json
import os
import sys
def login():
# cURL login
@andkon
andkon / blewatcher.ino
Created December 31, 2018 04:46
Using a Redbear Duo to watch and store the last 100 BLE addresses.
#include <Adafruit_NeoPixel.h>
/*
* Defaultly disabled. More details: https://docs.particle.io/reference/firmware/photon/#system-thread
*/
//SYSTEM_THREAD(ENABLED);
/*
* SYSTEM_MODE:
* - AUTOMATIC: Automatically try to connect to Wi-Fi and the Particle Cloud and handle the cloud messages.
@andkon
andkon / archive.py
Last active March 5, 2021 19:37
Archive all posts on instagram
from instagram_private_api import Client, ClientCompatPatch
from instagram_private_api.errors import ClientError
username = ""
password = ""
api = Client(username, password) # have to disable 2fa
posts = []
user_feed = api.user_feed(api.authenticated_user_id, max_id="")
posts.extend(user_feed['items'])