Skip to content

Instantly share code, notes, and snippets.

View TheFinestArtist's full-sized avatar
🔥
Reigniting

Leonardo Kim TheFinestArtist

🔥
Reigniting
View GitHub Profile
@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 / 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 {
@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을 실행시키는 핼퍼
@marcelpinto
marcelpinto / ControllableAppBarLayout.java
Last active December 12, 2019 03:42 — forked from blipinsk/ControllableAppBarLayout.java
An extension of Android AppBarLayout, that allows to programatically change the CollapsibleToolbarLayout state and receive state changes (collapsed, expanded and idle)
package com.eatfirst.android.ui.custom;
/**
* Copyright 2015 Bartosz Lipinski
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
@TheFinestArtist
TheFinestArtist / Snackbars.java
Last active September 4, 2022 10:15
Wrapper class to customise android.support.design snack bar!
/**
* Snackbars
*
* @author The Finest Artist
*/
public class Snackbars {
private Snackbars() {
}
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.NinePatchDrawable;
import android.util.DisplayMetrics;
import java.io.BufferedInputStream;
import java.io.File;
@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()
@TheFinestArtist
TheFinestArtist / LanguageDetector.java
Created December 27, 2014 13:40
Detect whether current language is Korean, Japanese or Others
/**
* Created by TheFinestArtist on 2014. 9. 2..
*/
public class LanguageDetector {
public enum Language {Korean, Japanese, English}
public static boolean isEnglish(CharSequence charSequence) {
boolean isEnglish = true;
for (char c : charSequence.toString().toCharArray()) {
@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* Copyright 2014 Chris Banes
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@lrytz
lrytz / z-automator.png
Last active February 4, 2023 21:20
Shortcut for Syntax Highlighting in Keynote