Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
vibing

dayt0n dayt0n

🎧
vibing
View GitHub Profile
@dayt0n
dayt0n / getColeman.py
Last active Jan 10, 2019
grab Dr. Rick Coleman's lecture slides for the day and combine into a PDF
View getColeman.py
#
# getColeman.py - grab Dr. Rick Coleman's lecture slides for the day and combine into a PDF
#
# made by Dayton Hasty
#
# (you may need to pip install fpdf)
#
import os
import requests
@dayt0n
dayt0n / TimeSheet.cpp
Created Sep 1, 2018
fill out a time sheet from information collected with an IFTTT csv log
View TimeSheet.cpp
/*
* TimeSheet.cpp - fill out a time sheet from information collected with an IFTTT csv log
*
* (c)dayt0n 2018
*
* build: g++ main.cpp -o timesheet -lcurl `Magick++-config --cxxflags --cppflags` `Magick++-config --ldflags --libs` -Wall -DNAME='"YOUR NAME"' -DSIG -std=c++11
*
*/
#include <string>
@dayt0n
dayt0n / bfEnc.py
Created Feb 1, 2018
bruteforce iTunes backup encryption password with dictionary attack
View bfEnc.py
#
# bfEnc.py - bruteforce iTunes backup encryption password with dictionary attack
#
# to use, plug in device with encryption turned on and let this program run
#
# (c)dayt0n 2018
#
import os
import sys
@dayt0n
dayt0n / bfrestrict.py
Last active Oct 19, 2018
quickly bruteforce iOS restrictions passcode
View bfrestrict.py
# bfrestrict.py - bruteforce iOS restrictions passcode
#
# if you don't have an unencrypted backup folder ready, just plug in the device and run this program
#
# Note: make sure you have libimobiledevice installed (we need idevicebackup2) if you plan to plug-and-play
#
# made by Dayton Hasty (c)2018
import os
import sys
import hashlib
@dayt0n
dayt0n / installDrivers.bat
Last active Dec 23, 2017
install drivers onto windows 7 install USB/DVD for motherboards made after the release of windows 7
View installDrivers.bat
@echo off
set argC=0
for %%x in (%*) do Set /A argC+=1
if not %argC% == 2 (
echo Incorrect usage
echo usage: installDrivers.bat [USB location- F:, E:, etc] [exact driver directory]
goto endingtime
)
@dayt0n
dayt0n / gcsize.py
Created Dec 2, 2017
increase or decrease dimensions of GCode in .gcode/.gco/.nc files for things like CNC routers
View gcsize.py
# gcsize.py - increase or decrease dimensions of GCode in .gcode/.gco/.nc files for things like CNC routers
#
# written by dayt0n
import sys
import os
import re
if len(sys.argv) < 3:
print("Insufficient arguments\nusage: %s [GCode file] [output] [size multiplier]") % sys.argv[0]
@dayt0n
dayt0n / printer_switch.py
Created Aug 16, 2016
run from /etc/rc.local on Raspberry Pi connected to Prusa i3 3D printer for homemade power button
View printer_switch.py
# printer_switch.py
#
# controls power for a 3D printer that is connected to a Raspberry Pi (optionally running Octoprint)
#
# Copyright 2016 by dayt0n
import RPi.GPIO as GPIO
import time
import os
import subprocess
View clypDownloader.c
/* clypDownloader - downloads music from clyp.it
*
* compile with: gcc clypDownloader.c -o clypDownloader -lcurl
*
* made by dayt0n
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@dayt0n
dayt0n / timer.c
Created Dec 28, 2015
timer written in C for my Advanced Computing class
View timer.c
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char* argv[]) {
int time = 1;
if (argc > 2) {
printf("Too many arguments.\nusage: %s <end time in seconds>\n",argv[0]);
exit(0);
@dayt0n
dayt0n / random_number_generator.c
Created Nov 19, 2015
Generate a random integer.
View random_number_generator.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int main(int argc, char* argv[]) {
srand(time(NULL));
unsigned seed = rand() % 1024;
int r;
srand(seed);