This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class KeyboardDetectingLayout extends RelativeLayout { | |
private boolean isSoftKeyboardVisible; | |
public KeyboardDetectingLayout(Context context) { | |
super(context); | |
this.isSoftKeyboardVisible = false; | |
} | |
public KeyboardDetectingLayout(Context context, AttributeSet attrs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Bundle; | |
public class LocalyticsPushContent { | |
private String externalUrl; | |
private String title; | |
private String message; | |
public static final String EXTRAS_PUSH_TITLE = "title";//Expected default value from Localytics | |
public static final String EXTRAS_PUSH_MESSAGE = "message";//Expected default value from Localytics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: Xcode [14851] | |
Path: /Applications/Xcode.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 6.2 (6776) | |
Build Info: IDEFrameworks-6776000000000000~11 | |
App Item ID: 497799835 | |
App External ID: 811890240 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Xcode [14851] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package se.snezdoliy.gist; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.RectF; | |
import android.util.AttributeSet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1. Init basic variables | |
APP_NAME="MyCoolApp" | |
PROJECT_DIR=$(PWD)/${APP_NAME} | |
BUILD_DIR=${PROJECT_DIR}/build | |
EXECUTABLE_NAME="MyCoolApp" | |
INFO_PLIST_FILE="${PROJECT_DIR}/${APP_NAME}/Info.plist" | |
#Need to get last commit information from Git repo. | |
git_notes=`git log -3 --pretty=format:'h by %an on %aD >> %s\n'` | |
commits_count=`git rev-list HEAD --count` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.RelativeLayout; | |
public class KeyboardDetectingLayout extends RelativeLayout { | |
private boolean isSoftKeyboardVisible; | |
public KeyboardDetectingLayout(Context context) { | |
super(context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.application.hunting.utils; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Matrix; | |
import android.media.ExifInterface; | |
import android.net.Uri; | |
import android.provider.MediaStore; | |
import android.support.annotation.Nullable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum WeekDays: Int { | |
case Sunday = 1, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday | |
var name: String { | |
switch self { | |
case .Monday: return "Mon" | |
case .Tuesday: return "Tue" | |
case .Wednesday: return "Wed" | |
case .Thursday: return "Thu" | |
case .Friday: return "Fri" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (RACSignal *) showDatePickerInController:(UIViewController *)parentViewController | |
title:(NSString *)title | |
startDate:(NSDate *)startDate | |
endDate:(NSDate *)endDate | |
dismissButton:(NSString *)dismissButtonTitle | |
actionButton:(NSString *)actionButtonTitle { | |
return [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) { | |
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title | |
message:@"\n\n\n\n\n\n\n\n\n" | |
preferredStyle:UIAlertControllerStyleActionSheet]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, Date Helper playrgound!" | |
//Returns the first date of the current year. Should return the following timestamp for the year 2016: 1451606400 | |
func getFirstDateOfCurrentYear() -> NSNumber { | |
//Get current year |