Skip to content

Instantly share code, notes, and snippets.

View Pash237's full-sized avatar

Pavel Alexeev Pash237

View GitHub Profile
https://gist.github.com/7257451fb9b47bb3926b6b561b44b3b2
23:05:02.655 | <-- GET objects/55e6b31d-22ef-4512-8c8b-85f5e59ee19a/9557/preferences/actuators 200 {
"actuators" : [
{
"approved_hidden" : false,
"relay_params" : {
"mode" : "impulse",
"impulse_duration" : 1
},
"id" : "02f4ddd1-6205-471e-a421-6f8c5b27440a",
"actuator_type" : "Wired",
23:04:58.497 | <-- GET objects/55e6b31d-22ef-4512-8c8b-85f5e59ee19a/9557/preferences/actuators 200 {
"actuators" : [
{
"internal_name" : "LED_Y",
"relay_params" : {
"mode" : "impulse",
"impulse_duration" : 1
},
"approved_hidden" : false,
"actuator_type" : "Wired",
@Pash237
Pash237 / Icecream.txt
Created September 17, 2020 18:26
Рейтинг мороженого
Стаканчик Karjalan
Мягкий, очень ванильно-ароматицированный, возможно с растительными жирами?
4 из 10
Настоящий пломбир, «Бодрая Корова».
Твёрдый, сливочный вкус, довольно ванильный.
Сладкий, но в меру. Жирный.
7 из 10
Пломбир Белое Золото, «Талосто»
19:56:33.011 | <-- GET objects/55e6b31d-22ef-4512-8c8b-85f5e59ee19a/9557/actuators 200 {
"actuators" : [
...
{
"relay_params" : {
"mode" : "impulse",
"impulse_duration" : 5
},
"id" : "299e5dca-c128-4273-91f2-eb6c7baa28b1",
"type" : "Relay",
ffmpeg -flags2 showall -i "https://silo1.staging-video.dev.cnord.net/playlist/v1/98ca8343-2b70-4f55-add9-d50d0c88ce99/hq?sign=8FcCO5JT3y2ApPfthBwvTQ&valid_until=1596127589" video.mp4
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype
@Pash237
Pash237 / fraction.md
Last active July 6, 2020 09:21
Ankle Fraction. Pavel Alexeev.

Fall off the 5-7 meters in Turkey on 24 september 2019.
Got a tibia fracture with fragment displacement in the right ankle.
In Turkey they tried to pin the fragment with biodegradable pins and put an external fixation. But the fragment pull out quite soon.

In leading traumatology clinic in St. Petersburg they said that joint surface is very damaged and would not last long. Suggesting an ankle fusion (arthrodesis) as a solution.

At the moment external fixation is demounted, physical therapy is in progress.


Observations:

@Pash237
Pash237 / remove_google_photos.js
Last active June 27, 2020 13:58
Script to remove Nikon SnapBridge images from Google Photos
#!/usr/bin/env node
var fs = require("fs");
var argv = process.argv.slice(2);
var exec = require('await-exec');
class Photo {
constructor(id) {
this.id = id;
this.filename = null;
//*****************************************************************
void updateButtons() {
// Cycle through Button array
for (int i = 0; i < NUMBER_BUTTONS; i = i + 1) {
byte message = BUTTONS[i]->getValue();
bool buttonJustReleased = (message == 0);
bool buttonLongPressed = (message == 3);
byte Button::getValue()
{
// If BUSY bit not set - read button
if (bitRead(_status, 0) == false) { // If busy false
if (digitalRead(_pin) == _last) {
if (_last == 0 && bitRead(_status, 2) == false && millis() - time > 2000) {
bitSet(_status, 2); // Set long pressed to true
return 3; // Long press
}
return 2; // If same as last state - exit