Skip to content

Instantly share code, notes, and snippets.

@abezukor
abezukor / discordUpdateIgnore.py
Created September 24, 2021 00:34
Discord Stop Update
#!/usr/bin/python3
import requests
import json
FILE_LOCATION = "/opt/discord/resources/build_info.json"
r = requests.get('https://discord.com/api/download?platform=linux&format=deb')
version = r.url.split('/')[5]
discord_version = {}
with open(FILE_LOCATION, 'r') as discord_version_file:
@abezukor
abezukor / 10Hzto60HzArduino
Created October 27, 2017 19:09
A simple program for the Arduino that converts a 10hz input to a 60hz output.
//sets the input pin to pin 4
int inputpin = 4;
//sets the outputpin to pin 2
int outputpin = 2;
//sets the base time between pulses based on 60Hz
float betweenpulses = (100.0/6.0)*1000;
//claculates how long the uptime is
float uptime = 0.1*betweenpulses;
//claculates how long the downtime is
float downtime = betweenpulses-uptime;
@abezukor
abezukor / arduinoprogram.ino
Last active April 7, 2018 16:09
Similar to last Summer my dad, Joel Fajans asked me to write some simple arduino code for him. This code is designed to take two sets of for inputs and only output a signal if all these inputs match a user defined configuration.
/* Abe Zukor 14/08/2016
* this program takes about 60 microseconds per loop
* If this program is not uploading to the arduino try opining the arduino IDE from the exe file instead of from the .ino file.
*
*/
//These are all anyone should ever need to change
//set these to 0 (off) 1 (on) or 2 (null/ dont care) the order is {Overld, Highlp, Active, Status). These vaules are for group 1. group 1 is on the left.
int pins1State[] = {0, 0, 2, 1};