Skip to content

Instantly share code, notes, and snippets.

View nikto-b's full-sized avatar
🦾
Running tea binary

nikto_b nikto-b

🦾
Running tea binary
  • Newt.team
  • Moscow, Russia
View GitHub Profile
void setup() {
pinMode(12, INPUT);
Serial.begin(9600);
Serial.println("Start");
delay(100);
}
bool prev = 0;
unsigned long started_at = 0;
unsigned int count = 0;
@nikto-b
nikto-b / test
Created September 24, 2022 19:13
import logging
from aiogram import Bot, Dispatcher, executor, types
API_TOKEN = ''
# Configure logging
logging.basicConfig(level=logging.INFO)
# Initialize bot and dispatcher
.include "m32def.inc"
.org 0
; ЛР 3
; Частота смены последовательности:
; 125ms / 8Hz
; Последоавтельности:
; 11111111
; 01111110
#!/bin/bash
DUNST=`pidof dunst`
FOCUSED=$(swaymsg -t get_tree | jq '.. | (.nodes? // empty)[] | select(.focused and .pid) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')
OUTPUTS=$(swaymsg -t get_outputs | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')
WINDOWS=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')
if [[ "$1" == "" ]]; then
CHOICE=`dmenu -l 10 -p "How to make a screenshot?" << EOF
@nikto-b
nikto-b / proguard-rules.pro
Created March 12, 2021 13:05
google_maps_flutter android proguard-rules file
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
#
# Starting with version 2.2 of the Android plugin for Gradle, this file is distributed together with
# the plugin and unpacked at build-time. The files in $ANDROID_HOME are no longer maintained and
# will be ignored by new version of the Android plugin for Gradle.
# Optimizations can be turned on and off in the 'postProcessing' DSL block.
# The configuration below is applied if optimizations are enabled.
# Adding optimization introduces certain risks, since for example not all optimizations performed by
# ProGuard works on all versions of Dalvik. The following flags turn off various optimizations
@nikto-b
nikto-b / reportGen.sh
Created December 17, 2020 00:35
generate homework report from many images
#!/bin/bash
files=$(ls photo*.jpg)
count=1
for i in $(echo $files); do
cp $i ./$count.jpg
jpegoptim --size=100K $count.jpg
count=$(($count+1))
done
Privacy Policy
nikto_b built the QR scanner app as
a Free app. This SERVICE is provided by
nikto_b at no cost and is intended for use as
is.
This page is used to inform visitors regarding my
policies with the collection, use, and disclosure of Personal
from rich.console import Console
from rich.markdown import Markdown
if __name__ == "__main__":
if sys.argv[1:]:
console = Console()
with open(sys.argv[1:][0]) as readme:
markdown = Markdown(readme.read())
console.print(markdown)
#!/bin/python
"""
A rudimentary URL downloader (like wget or curl) to demonstrate Rich progress bars.
"""
from concurrent.futures import ThreadPoolExecutor
from functools import partial
import os.path
import sys
from typing import Iterable
from urllib.request import urlopen
@nikto-b
nikto-b / labs.sh
Last active December 16, 2020 23:59
#get all files in $DIR that matches $NAME created last $MINUTE minutes, sort them in alphabet,
#copy in current dir as jpg(sorry) and try to compress in $SIZE size (for example 400K)
export count=1
export files="$(find $DIR -type d -name $NAME -prune -o -mmin -MINUTE -type f -print | rg -v '\(' | sort -t _ -k 2 -g | tr '\n' ' ')"
for i in $(echo $files); do
cp $i ./$count.jpg
jpegoptim --size=$SIZE $count.jpg
count=$(($count+1))
done