This file contains 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
# Gitignore settings for ESPHome | |
# This is an example and may include too much for your use-case. | |
# You can modify this file to suit your needs. | |
/.esphome/ | |
/secrets.yaml | |
/wifi.yaml |
This file contains 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
# Gitignore settings for ESPHome | |
# This is an example and may include too much for your use-case. | |
# You can modify this file to suit your needs. | |
/.esphome/ | |
/secrets.yaml | |
/wifi.yaml |
This file contains 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
const canvasSketch = require('canvas-sketch'); | |
const { renderPaths, createPath, pathsToPolylines } = require('canvas-sketch-util/penplot'); | |
const { clipPolylinesToBox } = require('canvas-sketch-util/geometry'); | |
const Random = require('canvas-sketch-util/random'); | |
const settings = { | |
dimensions: [ 12, 12 ], | |
orientation: 'landscape', | |
pixelsPerInch: 300, | |
scaleToView: true, |
This file contains 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
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/// @title OpenSea contract helper that defines a few things | |
/// @author Simon Fremaux (@dievardump) | |
/// @dev This is a contract used to add OpenSea's | |
/// gas-less trading and contractURI support | |
contract BaseOpenSea { | |
string private _contractURI; | |
address private _proxyRegistry; |
This file contains 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
function toAsciiString(address x) public view returns (string memory) { | |
bytes memory s = new bytes(40); | |
for (uint i = 0; i < 20; i++) { | |
byte b = byte(uint8(uint(x) / (2**(8*(19 - i))))); | |
byte hi = byte(uint8(b) / 16); | |
byte lo = byte(uint8(b) - 16 * uint8(hi)); | |
s[2*i] = char(hi); | |
s[2*i+1] = char(lo); | |
} |
This file contains 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
const ethers = require('ethers'); | |
const provider = new ethers.providers.JsonRpcProvider('https://bsc-dataseed.binance.org/'); | |
// you can find pair address from Factory Contract, method getPair(token1Addr, token2Addr). | |
let Contract = { | |
PancakePair: new ethers.Contract('0xb694ec7C2a7C433E69200b1dA3EBc86907B4578B',['function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)'], provider), | |
TwindexPair: new ethers.Contract('0xC789F6C658809eED4d1769a46fc7BCe5dbB8316E',['function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)'], provider) | |
} |
This file contains 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
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 12 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = Arduino pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: |
This file contains 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
#define RXD2 26 | |
#define TXD2 27 | |
void setup() { | |
Serial.begin(115200); | |
//Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2); | |
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2); | |
pinMode(17, OUTPUT); | |
digitalWrite(17, LOW); |
This file contains 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 requests | |
base_url = 'https://api.github.com' | |
def get_all_commits_count(owner, repo, sha): | |
first_commit = get_first_commit(owner, repo) | |
compare_url = '{}/repos/{}/{}/compare/{}...{}'.format(base_url, owner, repo, first_commit, sha) | |
commit_req = requests.get(compare_url) |
This file contains 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
### Welcome to the InfluxDB configuration file. | |
# The values in this file override the default values used by the system if | |
# a config option is not specified. The commented out lines are the configuration | |
# field and the default value used. Uncommenting a line and changing the value | |
# will change the value used at runtime when the process is restarted. | |
# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com | |
# The data includes a random ID, os, arch, version, the number of series and other | |
# usage data. No data from user databases is ever transmitted. |
NewerOlder