Skip to content

Instantly share code, notes, and snippets.

View stq's full-sized avatar

Viktar Kachan stq

View GitHub Profile
@stq
stq / gist:25258f1db4f7ebcc2f2196e812e0adcd
Created June 9, 2022 15:21
Ranobe.me download all books for pocketbook
function downloadFile(url) {
var loaded = $.Deferred();
var request = new XMLHttpRequest();
request.open('GET', url);
// ! setting the responseType has to be after the `request.open`
// `arraybuffer` is necessary for Internet Explorer and Edge becuase
// they do not support `blob` as response type
request.responseType = "arraybuffer";
request.onload = function() {
@stq
stq / gist:d2a6f697719219f6411ec5e34effb127
Created April 16, 2020 20:42
Arduino Nano termostat
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
float temp;
int needtemp;
float ratio;
float shift;
void setup() {
// set up the LCD's number of columns and rows:
@stq
stq / gist:7adc1faa2a31b721ce20
Created June 18, 2015 13:47
Angular test task
A minimalistic todo-list web application.
Description:
A todo application with specific features, marking its purpose as a fast way to store short todo-notes:
1. Hourly: todo items measures in whole hours (i.e. we do not work with minutes at all to make scheduling faster)
2. Quick type: todo item text is limited by 20 symbols.
3. Short-termed: user is limited by the end of the next week.
Sketch: https://moqups.com/setec/fI5LADd9/
@stq
stq / gist:3f33ae0c25de265486d0
Created June 18, 2015 13:46
Angular test task
A minimalistic todo-list web application.
Description:
A todo application with specific features, marking its purpose as a fast way to store short todo-notes:
1. Hourly: todo items measures in whole hours (i.e. we do not work with minutes at all to make scheduling faster)
2. Quick type: todo item text is limited by 20 symbols.
3. Short-termed: user is limited by the end of the next week.
Sketch: https://moqups.com/setec/fI5LADd9/