Skip to content

Instantly share code, notes, and snippets.

View dayt0n's full-sized avatar
🎧
vibing

dayt0n dayt0n

🎧
vibing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dayt0n on github.
  • I am dayt0n (https://keybase.io/dayt0n) on keybase.
  • I have a public key whose fingerprint is 8A79 56D1 20F0 CB11 9114 B498 EE9D 4D84 EDBC 06AF

To claim this, I am signing this object:

@dayt0n
dayt0n / random_number_generator.c
Created November 19, 2015 03:05
Generate a random integer.
#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);
@dayt0n
dayt0n / timer.c
Created December 28, 2015 04:43
timer written in C for my Advanced Computing class
#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 / clypDownloader.c
Created April 2, 2016 04:15
Downloads audio from https://clyp.it/
/* 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 / printer_switch.py
Created August 16, 2016 16:15
run from /etc/rc.local on Raspberry Pi connected to Prusa i3 3D printer for homemade power button
# 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
@dayt0n
dayt0n / gcsize.py
Created December 2, 2017 04:59
increase or decrease dimensions of GCode in .gcode/.gco/.nc files for things like CNC routers
# 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 / installDrivers.bat
Last active December 23, 2017 18:23
install drivers onto windows 7 install USB/DVD for motherboards made after the release of windows 7
@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 / bfrestrict.py
Last active January 31, 2024 07:13
quickly bruteforce iOS restrictions passcode
# 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 / bfEnc.py
Created February 1, 2018 21:36
bruteforce iTunes backup encryption password with dictionary attack
#
# 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 / TimeSheet.cpp
Created September 1, 2018 04:28
fill out a time sheet from information collected with an IFTTT csv log
/*
* 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>