Skip to content

Instantly share code, notes, and snippets.

View tuantmdev's full-sized avatar

Tuan Tran Manh tuantmdev

View GitHub Profile
import android.text.TextUtils;
import io.realm.Case;
import io.realm.Realm;
import io.realm.RealmObject;
import io.realm.RealmResults;
public class RealmFullTextSearch {
public static <T extends RealmObject> RealmResults<T> search(Realm realm, Class<T> modelClass, String query, String fieldName, boolean partialSearch){
@tuantmdev
tuantmdev / iterm2-solarized.md
Created December 25, 2017 04:58 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
@tuantmdev
tuantmdev / Breakpoints_v2.xcbkptlist
Created January 6, 2016 08:19 — forked from Ashton-W/Breakpoints_v2.xcbkptlist
My User Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<!-- All Exceptions -->
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
@tuantmdev
tuantmdev / UIApplication+PhoneCapability.h
Created November 6, 2015 05:05 — forked from maciekish/UIApplication+PhoneCapability.h
UIApplication+PhoneCapability. Detects whether the device can actually place a phone call.
//
// UIApplication+PhoneCapability.h
//
// Copyright (c) 2014 Maciej Swic
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@tuantmdev
tuantmdev / SDImageCache+Swizzle.h
Last active November 5, 2015 03:34
Make SDWebImage working with FLAnimatedImage to display GIF images
//
// SDImageCache+Swizzle.h
//
// Created by Herb Brewer on 07.02.15.
// Copyright (c) 2015 1984pulse. All rights reserved.
//
#import <SDWebImage/SDImageCache.h>
@interface SDImageCache (Swizzle)