Skip to content

Instantly share code, notes, and snippets.

View 4PixelsDev's full-sized avatar

Igor Stojanovic 4PixelsDev

  • Nov Sad, Serbia
View GitHub Profile
@4PixelsDev
4PixelsDev / StickyHeaderFlowLayout.m
Last active December 20, 2015 18:58 — forked from evadne/gist:4544569
IOS: UICollectonView Sticky Header - similar to UITableView header
//
// StickyHeaderFlowLayout.m
// Wombat
//
// Created by Todd Laney on 1/9/13.
// Copyright (c) 2013 ToddLa. All rights reserved.
//
// Modified from http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using THANKS!
//
@4PixelsDev
4PixelsDev / gist:7043611
Created October 18, 2013 15:53
XCode: Slow Down animations
// Paste this line in XCode console
p [(CALayer *)[[[[UIApplication sharedApplication] windows] objectAtIndex:0] layer] setSpeed:.1f]
@4PixelsDev
4PixelsDev / gist:7074661
Last active September 16, 2018 12:02
IOS: Take screenshot
- (UIImage*)screenshot
{
// Create a graphics context with the target size
// On iOS 4 and later, use UIGraphicsBeginImageContextWithOptions to take the scale into consideration
// On iOS prior to 4, fall back to use UIGraphicsBeginImageContext
CGSize imageSize = [[UIScreen mainScreen] bounds].size;
if (NULL != UIGraphicsBeginImageContextWithOptions)
UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
else
UIGraphicsBeginImageContext(imageSize);
@4PixelsDev
4PixelsDev / gist:8190170
Created December 30, 2013 23:48
IOS: Mogenerator run script
# Update the mogenerator files
cd ${SOURCE_ROOT}/${PROJECT_NAME}
/usr/bin/mogenerator --template-var arc=true -m ${PROJECT_NAME}.xcdatamodeld -M CoreData/Machine -H CoreData/Human`
@4PixelsDev
4PixelsDev / NSDateComponents+Extended.h
Created February 23, 2014 12:33
IOS: NSDateComponents extension with methods to determine whether current Year
//
// NSDateComponents+Extended.h
// FBBirthdays
//
// Created by Igor on 2/23/14.
// Copyright (c) 2014 4Pixels. All rights reserved.
//
#import <Foundation/Foundation.h>
@4PixelsDev
4PixelsDev / metadata_writer_for_object_detection.py
Last active October 30, 2023 00:20
Metadata writer for object detection
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,