Skip to content

Instantly share code, notes, and snippets.

@Tintenklecks
Tintenklecks / GistList!.md
Created October 23, 2014 06:31
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

@Tintenklecks
Tintenklecks / a.m
Last active August 29, 2015 14:07 — forked from linjunpop/a.m
NSString *a = @"bar";
NSString *aSelector = @"uppercaseString";
NSString *b = [a performSelector:NSSelectorFromString(aSelector)];
//NSString *b = objc_msgSend(a, NSSelectorFromString(aSelector));
NSLog(@"b: %@", b);
//=> b: "BAR"
@Tintenklecks
Tintenklecks / ExtendNSLogFunctionality.m
Last active August 29, 2015 14:07
ExtendNSLogFunctionality.m
//
// ExtendNSLogFunctionality.m
// ExtendNSLog
#import "ExtendNSLog.h"
#define NSLOG_DEFAULT_COLOR "\033[fg200,200,200;\033[bg10,10,10;" // Colors for the plugin XCodeColors
#define NSLOG_ERROR_COLOR "\033[fg255,0,0;\033[bg255,255,255;"
@Tintenklecks
Tintenklecks / ExtendNSLogFunctionality.h
Last active August 29, 2015 14:07
ExtendNSLogFunctionality.h
//
// ExtendNSLogFunctionality.h
// ExtendNSLog
#import <Foundation/Foundation.h>
#define EXTENDEDNSLOGVERSION @"1.0 beta"
#ifdef DEBUG
#define NSLog(args...) ExtendNSLog(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
@Tintenklecks
Tintenklecks / circularScaleAndCropImage
Last active August 29, 2015 14:07
circularScaleAndCropImage
- (UIImage *)circularScaleAndCropImage:(UIImage *)image frame:(CGRect)frame {
// This function returns a newImage, based on image, that has been:
// - scaled to fit in (CGRect) rect
// - and cropped within a circle of radius: rectWidth/2
//Create the bitmap graphics context
UIGraphicsBeginImageContextWithOptions(CGSizeMake(frame.size.width, frame.size.height), NO, 0.0);
CGContextRef context = UIGraphicsGetCurrentContext();
//Get the width and heights
@Tintenklecks
Tintenklecks / snippet.m
Created February 2, 2014 13:08 — forked from keicoder/snippet.m
objective-c : handy tool for troubleshooting Core Data using X-Code scheme
// handy tool for troubleshooting Core Data using X-Code scheme
1. select project file in X-Code
2. choose Edit Scheme... from the menu
3. Click the “Run yourapp.app” option
4. In the Arguments Passed On Launch section, add the following : -com.apple.CoreData.SQLDebug 1
5. Press OK and run the app
// Now you see lot's of information in the Debug Area
@Tintenklecks
Tintenklecks / requestSigTemplate.m
Created January 25, 2014 12:40 — forked from Ergin008/requestSigTemplate.m
Temp Objective-C Walkthrough
//
// API Walkthrough 1 - Signature Request via Template (Objective-C)
//
// To run this sample:
// 1. Copy the below code into your iOS project
// 2. Enter email, password, integrator key, name, templateId, and roleName and save
// 3. Compile and Run
//
// Enter your info:
@Tintenklecks
Tintenklecks / 301_redirect.txt
Created January 25, 2014 12:34
301 redirect
Redirect 301 /oldpage http://www.yoursite.com/newpage
@Tintenklecks
Tintenklecks / CircleUIImageViewMask
Created January 25, 2014 12:30 — forked from jeffbailey/CircleUIImageViewMask
Mask an UIImageView to a circle.
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
self.imageView.layer.masksToBounds = YES;
self.imageView.layer.cornerRadius = self.imageView.bounds.size.width / 2.;
}

What is AngularJS

  • AngularJS is not a library, it's a framework that embraces extending HTML into a more expressive and readable format
  • AngularJS is a structural framework for dynamic web apps
  • A framework that lets you use HTML as your template language and extend HTML's syntax to express your application's components clearly and succinctly
  • Angular is an opinionated framework on how a CRUD application should be built

Use AngularJS to build CRUD application

  • Angular was built for the CRUD application in mind. Games and GUI editors are examples of applications with intensive and tricky DOM manipulation. These kinds of apps are different from CRUD apps, and as a result are probably not a good fit for Angular