Skip to content

Instantly share code, notes, and snippets.

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

Fedor Gorsky fgh151

🏠
Working from home
View GitHub Profile
uint64_t chipid;
void setup() {
Serial.begin(115200);
}
void loop() {
chipid=ESP.getEfuseMac();//The chip ID is essentially its MAC address(length:6bytes)
Serial.printf("ESP32 Chip ID = %04X",(uint16_t)(chipid>>32));//print High 2 bytes
Serial.printf("%08X\n",(uint32_t)chipid);//print Low 4bytes.
delay(3000);
}
@fgh151
fgh151 / clone.sh
Created March 3, 2022 06:11
Clone all user repos
gh repo list fgh151 --limit 1000 | while read -r repo _; do
gh repo clone "$repo" "$repo"
done
/**
* Расчет показателей
*/
public function getIndex(int $number): int
{
switch ($number) {
case 1:
if (in_array((int)$this->position, [12, 13], true) || $this->ceo_grant || $this->expert) {
return 4;
}
@fgh151
fgh151 / competence-params.php
Created December 16, 2021 06:27
Competence text
<?php
return [
'position' => 'Должность',
'level' => 'Ученая степень',
'science' => 'Область науки',
'orcid' => ' Наличие ORCID',
'authorid' => 'Наличие Scopus Author ID',
'researchid' => 'Наличие ResearcherID',
'rinc' => 'Наличие SPIN РИНЦ',
@fgh151
fgh151 / UserCompetence.php
Created December 13, 2021 09:16
competence
/**
* Расчет показателей
*/
public function getIndex(int $number): int
{
switch ($number) {
case 1 : {
if (in_array((int) $this->position, [12, 13], true) || $this->ceo_grant || $this->expert) {
return 4;
}