Skip to content

Instantly share code, notes, and snippets.

View cobrce's full-sized avatar
🎯
Focusing

cob_258 cobrce

🎯
Focusing
View GitHub Profile
@cobrce
cobrce / HiddenForm.cs
Created January 26, 2019 21:41
form using RawInput and Hook to block keys from specific device
using RawInput_dll;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace RFID.Redir.lib
{
public partial class HiddenForm : Form
{
@cobrce
cobrce / send.py
Created November 9, 2018 15:34
A script for raspberry pi to send value(s) to shift register(s) (74HC595) (python3.6)
import RPi.GPIO as io
import time
SH = 17
DS = 27
ST = 22
def send(value):
io.output(DS,0)
io.output(SH,0)
@cobrce
cobrce / upload_then_flash.py
Last active November 8, 2018 21:38
Upload a hex file to RASPBERRY PI via FTP then flash it into AVR microcontroller with AVRDUDE (python 3.6)
from ftplib import FTP
from os import path
import spur # install it with PIP
address = "ip_address_of_raspberry_pi"
user_name = "user_name"
password = "password"
hex_file = r"absolute/relative_path_to_hex_file"
remote_hex_file = path.basename(hex_file)