Skip to content

Instantly share code, notes, and snippets.

View Stichoza's full-sized avatar
💻
Coding...

Levan Velijanashvili Stichoza

💻
Coding...
View GitHub Profile
@Stichoza
Stichoza / ხელოსნები.md
Last active March 30, 2024 12:22
ხელოსნები
  • ელექტროობა, დიაგნოსტიკა - იურა 555566484 - დიღმის მასივში, ასტრა დიღომში;
  • ელექტროობა, დიაგნოსტიკა - ზაზა 599730481 - საბურთალოზე, შარტავაზე საბურთალოს ბაზრთან (ყოფილი) მშენებარე ობიექტია და იმ ტერიტორიაზეა. გვერდით სამრეცხაოც არის;
  • ელექტროობა, დიაგნოსტიკა - გურამი 593214435 - "ნახალოკაში";
  • ელექტროობა, დიაგნოსტიკა - იგორი - "Opel"-ის ყოფილ სერვის ცენტრში - ელიავაზე;
  • ელექტროობა - არტურა 599656090 - ორთაჭალაში სამშობიაროს რო გაცდები მარცხნივ მწვანე კარებია და მანდ მუშაობს;
  • ელექტროობა - არტურა 593223950 - მანქანაზე "პერებოის" გარანტიით გასწორება, შეუძლია შეამოწმოს ყველაფერი (მანქანა ცივი უნდა იყოს) - მუშაბს მარჯვენა სანაპიროზე, დიღმის მასივიდან რომ არის ჩასასვლელი, ბოქსებს დაინახავთ, მანდ სამრეცხაოებიც არის;
  • ელექტროობა - ნიკო და ზურა 599789053 - ველოტრეკზე (მერსედესის ცენტრამდე);
  • ელექტროობა, დიაგნოსტიკა Star C3-ის აპარატით - რობო 568775999 - დიდუბეში აკვაპარკის ჩასახვევში პირველივე პროფელაქტიკა;
  • ელექტროობა - ედიკა 599601454;
  • ელექტროობა - ზვიადი 599540517 - დიღომში ყოფილ ავტობაზრობასთან. მუშაობ
@Stichoza
Stichoza / cma-cgm-track.php
Created February 22, 2016 06:57
[TextBar] Show container tracking status (cma-cgm)
<?php
$data = file_get_contents('http://www.cma-cgm.com/ebusiness/tracking/search?SearchBy=Container&Reference=CONTAINER_NUMBER');
$exp = explode('class="date-current"', $data);
$exp = explode('data-move="status', $exp[1]);
preg_match('/(.+\>)(.+)(\<.+)/', $exp[1], $matches);
echo $matches[2];
@Stichoza
Stichoza / Flashing Sonoff with HomeKit.md
Last active June 22, 2022 20:14
Flashing Sonoff with HomeKit support

Flashing Sonoff with HomeKit support

Pre-requisites

  1. Install ESP Tool if you don't have it already.
  2. Download fullhaboot.bin file.

Flashing

  1. Connect serial adapter cable:
    1. 3.3v -> 3.3v
  2. RX -> TX
@Stichoza
Stichoza / safari.css
Last active December 13, 2021 11:13
Safari style sheet hide news feed and right panel.
[role="main"] [data-pagelet="Stories"],
#ssrb_stories_end + div,
#ssrb_rhc_start + [data-pagelet="RightRail"],
[role="navigation"] [aria-label^="Watch"],
[role="navigation"] [aria-label^="Marketplace"],
[role="navigation"] [aria-label^="Gaming"],
[role="navigation"] [aria-label^="Home"],
[role="navigation"] [aria-label^="Groups"]
{
display: none !important;
@Stichoza
Stichoza / A Backup File For IR Codes
Last active November 7, 2021 15:43
Broadlink RM Homebridge HEX Codes
IR Remote HEX codes for Broadlink RM devices
Original Plugin: https://github.com/lprhodes/homebridge-broadlink-rm
Better Fork: https://github.com/kiwi-cam/homebridge-broadlink-rm
IR Code Database: http://irdb.tk/find/
Covert Pronto HEX to LIRC: https://gist.github.com/rcarmo/a268972c6173acab8eaa59b56c8d6367
@Stichoza
Stichoza / pvm.sh
Created March 17, 2021 14:49
PHP version manager script for MAMP Pro
function pvm() {
if [ "$1" = "" ]; then
echo "Please specify PHP version to run."
return 1
elif [ "$1" = "use" ]; then
if [ "$2" = "" ]; then
echo "Please specify a PHP version."
return 1
elif test -f "/Applications/MAMP/bin/php/php$2/bin/php"; then
export PATH=/Applications/MAMP/bin/php/php$2/bin:$PATH
@Stichoza
Stichoza / SayWinner.php
Created February 5, 2016 19:01
A small console command (php artisan winner) I wrote for generating a winner from attendees at Laravel meet-up.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class SayWinner extends Command
{
/**
* The name and signature of the console command.

Two colors provide good color visibility if the brightness difference and the color difference between the two colors are greater than a set range.

Color brightness is determined by the following formula: ((Red value X 299) + (Green value X 587) + (Blue value X 114)) / 1000 Note: This algorithm is taken from a formula for converting RGB values to YIQ values. This brightness value gives a perceived brightness for a color.

Color difference is determined by the following formula: (maximum (Red value 1, Red value 2) - minimum (Red value 1, Red value 2)) + (maximum (Green value 1, Green value 2) - minimum (Green value 1, Green value 2)) + (maximum (Blue value 1, Blue value 2) - minimum (Blue value 1, Blue value 2))

The rage for color brightness difference is 125. The range for color difference is 500.

@Stichoza
Stichoza / download.sh
Created January 18, 2015 22:45
Rustavi2 Video Downloader
#!/usr/bin/bash
# URL example: http://tv.guda.tv/vodr2live/_definst_/news%20portal/2015/ianvari/18/ps%20hak%20tbilisi.mp4/playlist.m3u8
ffmpeg -i $1 output.mkv
@Stichoza
Stichoza / simple_php_pagination.php
Created November 9, 2012 15:05
Simple PHP Pagination (one function)
<?php
/**
*
* Simple PHP Pagination
*
* @author Stichoza
* @link http://stichoza.com/
* @email admin@stichoza.com
* @version 1.0