Skip to content

Instantly share code, notes, and snippets.

View dev4dev's full-sized avatar
💭
Beep Boop Beep

Alex Antonyuk dev4dev

💭
Beep Boop Beep
View GitHub Profile
@matthiasplappert
matthiasplappert / gist:9493050
Last active August 29, 2015 13:57
QuickLook Debugging for `UIView`
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}
#!/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 November 8, 2019 17:20
An Objective-C UIImage category for better resizing using vImage
//
// 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 January 14, 2021 06:14
My uncrustify configuration file that I use for Objective-C.
# 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 February 27, 2013 17:10
Script to install provisioning profiles on a build server
#! /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 September 24, 2011 17:30 — forked from kylefox/ubuntu_setup.sh
Automated setup for a Ubuntu server with git, ruby, rvm, nginx.
#!/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 June 30, 2011 22:18
Macro for creating your "shared instance" using GCD
@implementation MySharedThing
+ (id)sharedInstance
{
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{
return [[self alloc] init];
});
}
@end