Skip to content

Instantly share code, notes, and snippets.

View funivan's full-sized avatar
⌨️
deliver bits

Ivan Shcherbak funivan

⌨️
deliver bits
View GitHub Profile
// ==UserScript==
// @name Show sale price
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Show sale price
// @author Ivan
// @match https://www.foxtrot.com.ua/*
// @grant none
// ==/UserScript==
@funivan
funivan / autio-to-text.sh
Last active March 27, 2025 09:43
Autio to text converter
#!/bin/zsh
url="$1";
if [ -z "$url" ]; then
echo "Please provide a url to download the mp3 files";
exit 1;
fi
mkdir -p models
mkdir -p audio
model_file=models/ggml-small.bin
#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
docker run --rm -v "$SCRIPT_DIR":/app \
-w "/app" \
-it "mileschou/xdebug:7.4" \
"./vendor/bin/phpunit"

SH

Current script directory

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

Full path to the directory

realpath ../tests

Keybase proof

I hereby claim:

  • I am funivan on github.
  • I am funivan (https://keybase.io/funivan) on keybase.
  • I have a public key whose fingerprint is 5ED6 311B 0EC4 A39B E7B3 BB53 FC89 9F51 7298 6F73

To claim this, I am signing this object:

#!/bin/bash
if [ ! -f /tmp/brightness ]; then
BRIGHTNESS=$(xrandr --verbose | grep -i brightness | cut -f2 -d ' ' | head -n1)
else
BRIGHTNESS=$(cat /tmp/brightness)
fi
# Increment (1) or decrement (0)
if [[ "$1" == "--down" ]]; then
<?php
/**
* This class is ok.
*/
class User {
/**
* @var string
*/
@funivan
funivan / install.sh
Last active February 6, 2019 07:57
Arduino led strip control
#!/bin/bash
mktouch() {
for f in "$@"; do
sudo mkdir -p -- "$(dirname -- "$f")"
sudo touch -- "$f"
done
}
class EqExtension extends AbstractExtension {
/**
* Returns extension name.
*
* @return string
*/
public function getName() {
return 'function';
}
@funivan
funivan / CalculateLines.py
Last active December 7, 2017 14:06
Sublime plugin
import sublime, sublime_plugin
class CalculateLinesCommand(sublime_plugin.TextCommand):
def run(self, edit):
lines={}
region = sublime.Region(0, self.view.size())
for lineRegion in self.view.lines(region):
key = self.view.substr(lineRegion)
key = key.strip(' \t\n\r')