Skip to content

Instantly share code, notes, and snippets.

View ilfey's full-sized avatar
:shipit:
https://nohello.net/

ilfey ilfey

:shipit:
https://nohello.net/
View GitHub Profile
@ilfey
ilfey / main.py
Created August 23, 2022 14:13
HEIC to PNG converter
import os
from PIL import Image
import pillow_heif
os.chdir(input('Enter the full path to the folder with heic-images: '))
for path in os.listdir():
extension = path.split('.')
@ilfey
ilfey / main.py
Created August 23, 2022 14:28
Simple image to png converter
import os
from PIL import Image
os.chdir(input('Enter the full path to the folder with images: '))
for path in os.listdir():
extension = path.split('.')
if extension[-1].lower() != 'png':
@ilfey
ilfey / config.json
Created August 23, 2022 15:06
Wallpaper changer for windows
{
"delay": 5,
"path": "D:\\Backgrounds\\"
}
@ilfey
ilfey / go-build.sh
Created October 4, 2022 06:33
Bash build script for all platforms.
#!/usr/bin/env bash
# list of the platforms: https://go.dev/doc/install/source#environment
platforms=(
"aix:ppc64"
"android:386"
"android:amd64"
"android:arm"
"android:arm64"
"darwin:amd64"
@ilfey
ilfey / main.go
Created October 12, 2022 16:40
demotivator creator
package main
import (
"image"
"image/color"
"image/draw"
"image/png"
"golang.org/x/image/font"
"golang.org/x/image/font/basicfont"
"golang.org/x/image/math/fixed"
#include <iostream>
#include <fstream>
#include <cstring>
const char *sourceFileName = "source_file.txt";
const char *encodedFileName = "encoded_file.txt";
const char *decodedFileName = "decoded_file.txt";
@ilfey
ilfey / README.md
Last active March 26, 2023 11:34
1 лаба по ОПБД

playground

---
title: 1 lab
---
erDiagram
    workers {
        integer id PK
        varchar name
@ilfey
ilfey / dump.sql
Created March 26, 2023 13:42
3 лаба по ОПБД
CREATE TABLE IF NOT EXISTS Product(
Id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
ProductName VARCHAR NOT NULL,
Manufacturer VARCHAR NOT NULL,
ProductCount INT NOT NULL,
Price MONEY NOT NULL
);
CREATE TABLE IF NOT EXISTS Customer(
Id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
@ilfey
ilfey / settings.json
Created April 8, 2023 17:20
My VS Code setting.json
{
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"editor.formatOnPaste": true,
"editor.largeFileOptimizations": true,
"editor.renderWhitespace": "none",
"editor.autoClosingBrackets": "always",
"editor.autoClosingOvertype": "always",
"editor.autoClosingQuotes": "always",
"editor.autoClosingDelete": "always",
@ilfey
ilfey / scroll.ts
Last active May 4, 2023 08:05
scroll to element for react
function scrollToElement(el: HTMLElement, onScrollEnd = () => { }) {
const { top } = el.getBoundingClientRect()
var step = 75
var iterationsCount = Math.abs(Math.floor(top / step))
if (top < 0) {
step = -step
iterationsCount += 1
}