Skip to content

Instantly share code, notes, and snippets.

View rat's full-sized avatar
🏠
Working from home

Renato Tavares rat

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
piHunter
Copyright (C) 2018 Renato Tavares <dr.renatotavares@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@rat
rat / mouse.reg
Created April 27, 2022 00:26
Estrutura de vídeos
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Run Batch script]
@="&New Video"
"Icon"="%SystemRoot%\\System32\\shell32.dll,71"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Run Batch script\command]
@="C:\\Windows\\video.bat \"%V\""
@rat
rat / .js
Created April 24, 2020 18:12
{
// Define o tema do VSCode
"workbench.colorTheme": "Dracula",
// Configura tamanho e família da fonte
"editor.fontSize": 18,
"editor.lineHeight": 24,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": false,
"explorer.compactFolders": false,
// Aplica linhas verticais para lembrar de quebrar linha em códigos muito grandes
@rat
rat / .c
Created April 2, 2018 01:12
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include "lib/twi.h"
#include "lib/millis.h"
#include "lib/uart.h"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
piHunter
Copyright (C) 2018 Renato Tavares <dr.renatotavares@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
piHunter
Copyright (C) 2018 Renato Tavares <dr.renatotavares@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
piHunter
Copyright (C) 2018 Renato Tavares <dr.renatotavares@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@rat
rat / LM74.c
Created September 11, 2016 02:38
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#include "usart/usart.h"
#include <stdlib.h>
uint8_t SPI(uint8_t data);
int main(void)
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>
#define F_CPU 8000000UL
#define RAIN_GAUGE_PIN 2
#define LED 13
volatile unsigned long last_rain_IRQ = 0; /* Debouncing */
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>
#define RAIN_GAUGE_PIN 2
const byte LED = 13;
volatile unsigned long last_rain_IRQ = 0; /* Debouncing */
volatile unsigned int rain_clicks = 0;