Skip to content

Instantly share code, notes, and snippets.

#include <SPI.h>
#include "mcp_can.h"
MCP_CAN CanBusShield(10); // Set CS pin: 10 for old, 9 for v1.2 and up
void setup() {
Serial.begin(500000);
Serial.println();
Serial.println();
@alexey-bass
alexey-bass / ddns-start.sh
Created May 9, 2019 20:27
noip.com ddns start custom script
#!/bin/sh
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS
# https://github.com/RMerl/asuswrt-merlin/wiki/DDNS-Sample-Scripts
# https://www.noip.com/integrate/request
USERNAME="alexey-bass"
PASSWORD="**********"
HOSTNAME="*****.ddns.net"
IP="$(curl -fs4 https://myip.dnsomatic.com/)"
/**
To program lite version, choose
Generic ESP8266 Module, 80 Mhz, 40 Mhz, DOUT, 921600, 1M (512K SPIFFS), nodemcu, Disabled, None
DOUT and nodemcu!
*/
#include "ESP8266WiFi.h"
#include <Adafruit_NeoPixel.h>
/**
Useful links
https://wiki.wemos.cc/products:d1:d1_mini
https://cdn-images-1.medium.com/max/1400/1*YKc8KpAfMrlhrOLmNjdRwQ.png (D1 full pinout)
https://github.com/Jorgen-VikingGod/ESP8266-MFRC522
https://github.com/miguelbalboa/rfid
d1 mini rc52 wiring
https://discourse-cdn-sjc1.com/business5/uploads/mydevices/original/2X/e/ecedba79dc05f2c0b02b7fba8b3da2681590a11a.jpg
@alexey-bass
alexey-bass / 0. Honda HDS
Last active August 29, 2015 21:28
HDS params for Honda Civic Mk9 5D 2013: Model FK2, Engine R18Z4
Param IDs and names.
@alexey-bass
alexey-bass / crawler.js
Last active October 30, 2018 13:19
Phantom Crawler
function log(msg) {
console.log(getTime()+ ': '+ msg);
}
function getTime() {
var d = new Date();
return pad(d.getHours()) +':'+ pad(d.getMinutes()) +':'+ pad(d.getSeconds()) +'.'+ rpad(d.getMilliseconds(), 3);
}
function pad(val, len) {
@alexey-bass
alexey-bass / dd-wrt.js
Last active October 13, 2021 09:46
Find DD-WRT router by criteria
/*
1. open page http://www.dd-wrt.com/wiki/index.php/Supported_Devices
2. open browser's console (in Google Chrome or Mozilla Firefox)
3. inject jQuery
4. tune your filter
5. run snippet
*/
// inject jQuery
(function() {
@alexey-bass
alexey-bass / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@alexey-bass
alexey-bass / gist:9889744
Last active August 29, 2015 13:57
Israel Spam Phone Numbers as blocked with Mr.Number
+972-50-809-1010
+972-58-780-5377
+972-9-773-0541 - Drink Center, Netanya
000-014-01
026-312-902
050-509-1010
054-400-2816
055-700-0904
072-221-9444
072-221-9506
@alexey-bass
alexey-bass / random-id.js
Last active January 5, 2024 00:07
Generate read-error-free hash. Similar letters absent (like 0 and O).
function randomString(length, chars) {
var result = '';
for (var i = length; i > 0; --i) {
result += chars[Math.round(Math.random() * (chars.length - 1))];
}
return result;
}
var dictionary = '';
dictionary+= 'ABCDEFGHKLMNPQRTWXYZ'; // IJOSUV