This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pcbnew | |
import math | |
# Get the board object | |
board = pcbnew.GetBoard() | |
# Convert coordinates to KiCad internal units (nanometers) | |
def mm_to_nm(val): | |
return int(val * 1e6) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enable ENS16x | |
#ifndef USE_ENS16x | |
#define USE_ENS16x | |
#endif | |
// enable AHT2x | |
#ifndef USE_AHT2x | |
#define USE_AHT2x | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/usr/bin/python | |
# encoding:utf-8 | |
# Waterproof Ultrasonic Module AJ-SR04M | |
import RPi.GPIO as GPIO | |
import time | |
import paho.mqtt.client as mqtt | |
timeout = 1 # seconds wait for signal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fa = 12; // minimum angle | |
$fs = 2; // minimum size | |
$fn = $preview ? 24 : 64; // number of fragments | |
micron = 0.001; // for showing nice on screen OpenSCAD | |
print_margin = 0.3; // print_margin for plastic expansion and some free room | |
// inside or outside: https://en.wikipedia.org/wiki/Point_in_polygon#Winding_number_algorithm | |
// radius vs distance to polygon: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# execfile(r'[ENTER YOUR PATH]\d1mini_kicad.py') | |
import os | |
import sys | |
import pcbnew | |
# Cut the Edges of a typical d1 mini board | |
board = pcbnew.GetBoard() | |
aLayerCuts = board.GetLayerID('Edge.Cuts') | |
aSilkFront = board.GetLayerID('F.SilkS') | |
aSilkBack = board.GetLayerID('B.SilkS') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html><html lang="en"> | |
<head> | |
<title>Platformio Library comments</title> | |
</head> | |
<body> | |
<?php | |
// use: platformio.php?id=999 | |
// Comments for platformio.ini on any library from platformio.org | |
function LibraryComments($id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !defined(ESP8266) | |
#error This file is for ESP8266 only | |
#endif | |
#define COMPDATE __DATE__ " " __TIME__ | |
#define APPNAME "Root Certificate Example" | |
#define VERSION "V0.0.2" | |
#include <Arduino.h> | |
#include <ESP8266WiFi.h> // Arduino library - https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFi.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <Arduino.h> | |
#include <Ticker.h> | |
class MyLed | |
{ | |
public: | |
// * Custom led | |
MyLed(uint8_t led) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Aliexpress Total Price Script | |
// @namespace https://bolukan.nl | |
// @description Show Total Price on Aliexpress | |
// @version 0.1 | |
// @author Bolukan | |
// @match *://*.aliexpress.com/wholesale* | |
// @match *://*.aliexpress.com/w/wholesale* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Extract AliExpress Order Detail Pages | |
// @downloadURL https://gist.github.com/Bolukan/16146e6e9c3c7e05a8a23f8b2f8a1dc4/raw/778a24f255bb6f91bf07019e94e1eabb333ef17c/Aliexpress_items.user.js | |
// @updateURL https://gist.github.com/Bolukan/16146e6e9c3c7e05a8a23f8b2f8a1dc4/raw/778a24f255bb6f91bf07019e94e1eabb333ef17c/Aliexpress_items.user.js | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Extract the contents from AliExpress order detail pages, while also removing all svg tags | |
// @author Bolukan | |
// @match https://www.aliexpress.com/p/order/detail.html* | |
// @grant none |
NewerOlder