Skip to content

Instantly share code, notes, and snippets.

View unixfool's full-sized avatar
🍺
I want a Beer free!!! ;)

y2k unixfool

🍺
I want a Beer free!!! ;)
View GitHub Profile
// Variables for arduino
int valX;
int valY;
bool changedX;
bool changedY;
// Normalized values
int horizontalVal = 0;
int verticalVal = 0;
@unixfool
unixfool / console.js
Created July 18, 2021 18:51
remote zebra console
const Console = require("lib/Console");
const appWindow = require("lib/appWindow");
Console.on('startup', (id) => {
Console.codeTargeted(id, appWindow + `
document.zebra = new appWindow("zebra",1,"MONITORING v1.0","");
document.zebra.main.css('width','60%');
document.zebra.main.css('height','45%');
document.zebra_console_style = $(\`<style>
div.appWindowFrame {
@unixfool
unixfool / stepper.ino
Created June 29, 2021 10:38
Needs Stepper.h
#include "Stepper.h"
#define STEPS 32 // Number of steps for one revolution of Internal shaft
// 2048 steps for one revolution of External shaft
volatile boolean TurnDetected; // need volatile for Interrupts
volatile boolean rotationdirection; // CW or CCW rotation
const int PinCLK=2; // Generating interrupts using CLK signal
const int PinDT=3; // Reading DT signal
const int PinSW=4; // Reading Push Button switch
@unixfool
unixfool / evilnet-rbl.ini
Created June 29, 2021 10:35
EvilNet RBL
[bl:rbl.evilnet.org]
ban_unknown=false
default_ban_message=Your host is listed in the EvilNet DNSBL (%reason%). https://dnsbl.evilnet.org/your?ipaddress=%ip% for info.
reply:3=Join/Part
reply:5=Compromised HOST/IP
reply:6=IRC Spam Drone
reply:7=DDOS Drone
reply:8=Open Proxy/HTTP Proxy
reply:10=Abused VPN Services
reply:17=Auto determined botnet IPs
@unixfool
unixfool / four-digital.ino
Created June 29, 2021 10:34
Four Digital
int latch=9; //74HC595 pin 9 STCP
int clock=10; //74HC595 pin 10 SHCP
int data=8; //74HC595 pin 8 DS
unsigned char table[]=
{0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c
,0x39,0x5e,0x79,0x71,0x00};
void setup() {
pinMode(latch,OUTPUT);
@unixfool
unixfool / arduino-75hc.ino
Last active June 29, 2021 10:33
74HC595 And Segment Display
// define the LED digit patterns, from 0 - 9
// 1 = LED on, 0 = LED off, in this order:
// 74HC595 pin Q0,Q1,Q2,Q3,Q4,Q5,Q6,Q7
// Mapping to a,b,c,d,e,f,g of Seven-Segment LED
byte seven_seg_digits[10] = { B11111100, // = 0
B01100000, // = 1
B11011010, // = 2
B11110010, // = 3
B01100110, // = 4
B10110110, // = 5