Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View TheFinestArtist's full-sized avatar
🔥
Reigniting

Leonardo Kim TheFinestArtist

🔥
Reigniting
View GitHub Profile
@cbess
cbess / realm-helper.swift
Created February 14, 2015 07:23
Realm Helper
import Foundation
/**
Provides the default transaction block for perform a Realm transaction.
:param: block The block to perform the transaction. The realm is used to store the transaction.
*/
func realmTransaction(block: (realm: RLMRealm) -> Void) {
let realm = RLMRealm.defaultRealm()
@uptown
uptown / NSObject+UTFrameworkProtected.h
Last active August 29, 2015 14:25
iOS Auto-adjusting autolayout snippet with some tricks
//
// NSObject+UTFrameworkProtected.h
// UTFramework
//
// Created by Juyoung Lee on 2014. 1. 2..
// Copyright (c) 2014년 Juyoung.me. All rights reserved.
//
#import <Foundation/Foundation.h>
// NSObject내에 저장된 callback을 실행시키는 핼퍼
@TheFinestArtist
TheFinestArtist / PrefixHeader.pch
Created July 25, 2015 14:26
PrefixHeader.pch
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define UIColorFromRGBA(rgbValue, alphaValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:alphaValue]
@TheFinestArtist
TheFinestArtist / DipPixelHelper.java
Created July 25, 2015 14:08
DipPixelHelper.java
import android.content.Context;
import android.content.res.Resources;
import android.util.TypedValue;
/**
* DipPixelHelper
*
* @author The Finest Artist
*/
public class DipPixelHelper {
@TheFinestArtist
TheFinestArtist / ScreenHelper.java
Created July 25, 2015 14:10
ScreenHelper.java
/**
* Copyright 2013 The Finest Artist
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
@TheFinestArtist
TheFinestArtist / KeyboardHelper.java
Created July 25, 2015 14:11
KeyboardHelper.java
import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
/**
* KeyboardHelper
* It pops up keyboard to input texts and drops a cursor to a view(final View view, such as Edittext)
*
* @author The Finest Artist
*/
import android.content.Context;
/**
* Created by TheFinestArtist on 5/14/15.
*/
public class Vibrator {
public static void eee(Context context) {
if (context == null)
return;
@TheFinestArtist
TheFinestArtist / EmailHelper.java
Created July 25, 2015 14:13
EmailHelper.java
import android.content.Context;
import android.content.Intent;
/**
* Created by TheFinestArtist
*/
public class EmailHelper {
public static void sendSupportMail(Context context) {
Intent i = new Intent(Intent.ACTION_SEND);
//
// SDCAlertView+Custom.h
// Custom
//
// Created by The Finest Artist
//
//
#import <SDCAlertView/SDCAlertController.h>
//
// CRToast+Custom.h
// Custom
//
// Created by The Finest Artist
//
//
#import <CRToast/CRToast.h>