Skip to content

Instantly share code, notes, and snippets.

View alexey-kar's full-sized avatar

Alexey Karchevskii alexey-kar

View GitHub Profile
@alexey-kar
alexey-kar / num2str.php
Created July 3, 2019 14:49 — forked from bupy7/num2str.php
Сумма прописью
<?php
/**
* Возвращает сумму прописью
* @author runcore
* @uses morph(...)
*/
function num2str($num) {
$nul='ноль';
$ten=array(
array('','один','два','три','четыре','пять','шесть','семь', 'восемь','девять'),
<?php
/**
* @author: Sohel Rana
* @url: https://blog.sohelrana.me/parsing-xml-multiple-namespaces-using-php/
* @license: MIT
* Parsing XML with multiple namespaces using PHP
*/
$xmlString = "<en:Envelope xmlns:en=\"http://www.softcare.com/HIPAA/SC/Enrollment/0301\"
xmlns:sc=\"http://www.softcare.com/HIPAA/SC/0203\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
@alexey-kar
alexey-kar / overlay.css
Created April 21, 2020 10:39 — forked from h4/overlay.css
Полупрозрачный оверлей
.overlay {
position: fixed;
z-index: 100;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: #000;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=55);
opacity: 0.55;
@alexey-kar
alexey-kar / file_force_contents.php
Created November 19, 2020 10:00 — forked from ofca-snippets/file_force_contents.php
Extended version of php function "file_put_contents"
/**
* Extended version of function file_put_contents.
*
* This function will create all dirs in the path to the file,
* if they does not exists.
*
* @param string path to file
* @param string file content
* @param int flag taken by file_put_contents function
* @return bool false on failure, true on success
@alexey-kar
alexey-kar / Supervisor And Cron
Created March 12, 2024 08:27 — forked from abhitechno01/Supervisor And Cron
supervisor and cron commands
#########################
Supervisor
#########################
First install supervisor
apt install supervisor
Create a program then give permission to program
chmod +x <program_path>