Skip to content

Instantly share code, notes, and snippets.

💭
ШТО

Alex Antonyuk dev4dev

💭
ШТО
Block or report user

Report or block dev4dev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matthiasplappert
matthiasplappert / gist:9493050
Last active Aug 29, 2015
QuickLook Debugging for `UIView`
View gist:9493050
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}
View patch-edid.rb
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@mattdonnelly
mattdonnelly / UIImage+vImageScaling.h
Last active Jun 28, 2018
An Objective-C UIImage category for better resizing using vImage
View UIImage+vImageScaling.h
//
// UIImage+vImageScaling.h
// UIImage+vImageScaling
//
// Created by Matt Donnelly on 03/07/2013.
// Copyright (c) 2013 Matt Donnelly. All rights reserved.
//
#import <UIKit/UIKit.h>
@m2orris
m2orris / uncrustify_obj_c.cfg
Last active Dec 15, 2015
My uncrustify configuration file that I use for Objective-C.
View uncrustify_obj_c.cfg
# Uncrustify 0.60
newlines = auto
input_tab_size = 4
output_tab_size = 4
string_escape_char = 92
string_escape_char2 = 0
tok_split_gte = false
utf8_bom = ignore
utf8_byte = false
utf8_force = false
@subdigital
subdigital / install_provisioning_profile.sh
Created Feb 27, 2013
Script to install provisioning profiles on a build server
View install_provisioning_profile.sh
#! /bin/sh
# Takes a provisioning profile and installs it into the system path.
# This requires poking inside the provisioning profile and searching for the
# UUID present at the end of the file.
set -e
if [[ -z "$1" ]]
then
@girasquid
girasquid / ubuntu_setup.sh
Created Sep 24, 2011 — forked from kylefox/ubuntu_setup.sh
Automated setup for a Ubuntu server with git, ruby, rvm, nginx.
View ubuntu_setup.sh
#!/usr/bin/env bash
# ----------------------------------------------------
#
# Automated setup for a Ubuntu server with git, ruby, rvm, nginx.
# (Used at Carbonmade)
#
# Usage:
# - SCP this file to your server: scp ubuntu_setup.sh you@server:~
# - Make it executable: chmod +x ubuntu_setup.sh
# - Run it: bash ubuntu_setup.sh
@lukeredpath
lukeredpath / ExampleClass.m
Created Jun 30, 2011
Macro for creating your "shared instance" using GCD
View ExampleClass.m
@implementation MySharedThing
+ (id)sharedInstance
{
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{
return [[self alloc] init];
});
}
@end
You can’t perform that action at this time.