Skip to content

Instantly share code, notes, and snippets.

@shexbeer
shexbeer / FunWithTrees.php
Last active December 27, 2015 01:39
Showing a colleague some things with tree's
<?php
/**
* Category Class Object ... because i dont got any definitions here
*/
class Category
{
private $uid;
private $parentUid;
function __construct($uid, $parentUid)
@shexbeer
shexbeer / gist:cb069d36ca8ec5edb515
Last active August 31, 2018 17:00
Crops a Picture from AVCaptureSession to the bounds of the AVCaptureVideoPreviewLayer (so Preview = CameraImage)
-(UIImage*) cropCameraImage:(UIImage*) original toPreviewLayerBounds:(AVCaptureVideoPreviewLayer*) previewLayer {
UIImage *ret = nil;
CGRect previewImageLayerBounds = previewLayer.bounds;
// This calculates the crop area.
// keeping in mind that this works with on an unrotated image (so a portrait image is actually rotated counterclockwise)
// thats why we use originalHeight to calculate the width
float originalWidth = original.size.width;
float originalHeight = original.size.height;
[22:38:41.425093] main:952 Starting aircast version: v0.2.28.3 (Oct 25 2020 @ 12:18:27)
[22:38:41.425940] main:960 no config file, using defaults
[22:38:41.426066] Start:716 Binding to 192.168.0.71
[22:38:50.158647] AddCastDevice:653 [0x7fa130028000]: adding renderer (Fernseher im Wohnzimmer)
[22:38:50.261125] AddCastDevice:653 [0x7fa1300289a8]: adding renderer (Soundbar)
[22:38:50.261665] AddCastDevice:653 [0x7fa130029350]: adding renderer (32 Zoll TV)
[22:38:50.262268] AddCastDevice:653 [0x7fa130029cf8]: adding renderer (Küche)
[22:38:50.263039] AddCastDevice:653 [0x7fa13002a6a0]: adding renderer (Wohnung)
[22:38:50.263065] AddCastDevice:659 [0x7fa13002a6a0]: creating MAC 3002a6aa
[22:38:51.163517] MRThread:275 [0x7fa130028000]: Cast thread timer 1004 10000