Skip to content

Instantly share code, notes, and snippets.

View ZhukV's full-sized avatar
🏠
Working from home

Vitaliy Zhuk ZhukV

🏠
Working from home
View GitHub Profile
@ZhukV
ZhukV / test.php
Last active August 31, 2016 06:45
<?php
$client = new Client();
$api = new Api($client);
$api->patient()->sendReceiptEmail($practiceId, $appointmentId, $paymentId, '[email protected]');
$api->appointment()->get($practiceId, $appointmentId);
@ZhukV
ZhukV / crash.log
Created May 28, 2015 17:06
Crash PHPStorm with undefined symbols
Process: phpstorm [20244]
Path: /Applications/PhpStorm.app/Contents/MacOS/phpstorm
Identifier: com.jetbrains.PhpStorm
Version: 8.0.3 (PS-139.1348)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: phpstorm [20244]
User ID: 501
Date/Time: 2015-05-28 20:05:52.713 +0300
+ (UIImage *)imageNamedWithoutCache:(NSString *)imagePath withMask:(NSString *)maskPath
{
UIImage *realImage = [self imageNamedWithoutCache:imagePath];
UIImage *maskImage = [self imageNamedWithoutCache:maskPath];
CGImageRef maskRef = maskImage.CGImage;
CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef),
CGImageGetHeight(maskRef),
CGImageGetBitsPerComponent(maskRef),
#import "UIScreen+ScreenBounds.h"
@implementation UIScreen (ScreenBounds)
+ (CGRect)screenBounds
{
CGRect screenBounds = [UIScreen mainScreen].bounds;
if(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1){
return screenBounds;
/**
ks0066.c - Working with LCD displays on based controllers KS0066
Author: Vitaliy Zhuk
*/
#include <util/delay.h>
#include "ks0066.h"
void lcdInit()
@ZhukV
ZhukV / ds18b20.c
Created January 29, 2014 19:22
Work with temperature sensor DS18B20
/**
ds18b20.c - work with temperature sensor DS18B20
Author: Vitaiy Zhuk
*/
#include <util/delay.h>
#include "ds18b20.h"
/**
@ZhukV
ZhukV / CountryContinent.php
Created January 9, 2014 06:59
Grouping countries by continent
<?php
namespace Acme\Demo;
/**
* Parsed from http://timezone.help.ch/
*
* @author Vitaliy Zhuk <[email protected]>
*/
class CountryContinent
@ZhukV
ZhukV / StreamHandler.php
Created October 1, 2013 17:57
Override monolog stream handler for auto create directory
<?php
namespace Acme\Demo\Monolog\Handler;
use Monolog\Handler\StreamHandler as BaseStreamHandler;
use Symfony\Component\Filesystem\Filesystem;
/**
* Auto create log directory, if directory not found.
* The base stream handler in monolog package not auto created
@ZhukV
ZhukV / app.php
Created August 14, 2013 06:34
Check multiple implementation
<?php
interface iA
{
public function someA();
public function thisIs();
}
interface iB
{
@ZhukV
ZhukV / ExcelFileResponse.php
Created July 26, 2013 08:46
Excel file response for download excel files usage PHPExcel library (Symfony HttpFoundation)
<?php
namespace Acme\DemoBundle\HttpFoundation;
use Symfony\Component\HttpFoundation\Response;
/**
* Response for download excel file
*/
class ExcelFileResponse extends Response