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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>com.ngrok.onstartup</string> |
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
extension Collection{ | |
/** | |
* Groups elements of the original collection by the key returned by the given [keySelector] function | |
* applied to each element and returns a map where each group key is associated with a list of corresponding elements. | |
* | |
* The returned map preserves the entry iteration order of the keys produced from the original collection. | |
**/ | |
public func groupBy<Value>(by keySelector:(Element) -> Value?) -> [Value?:[Element]]{ | |
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
/** | |
_____ _____ _ | |
| __ \ / ____| | | | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __ | |
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__| | |
| |__| | __/ |____| | | |_| | |_) | || (_) | | | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_| | |
__/ | | | |
|___/|_| | |
*/ |
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.batterii.mobile.ui.component.decorators; | |
import android.graphics.Rect; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
/** | |
* Created by anthonykiniyalocts on 12/8/16. | |
* | |
* Quick way to add padding to first and last item in recyclerview via decorators |
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
-(void)textViewDidChangeSelection:(UITextView *)textView { | |
CGPoint cursorPosition = [textView caretRectForPosition:textView.selectedTextRange.start].origin; | |
[self.tableView scrollRectToVisible:CGRectMake(cursorPosition.x, cursorPosition.y | |
, textView.frame.size.width, textView.frame.size.height) animated:YES]; | |
} |
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
private void safeAnimateToolbarAndStatus(boolean reverse){ | |
Integer colorFrom = reverse ? ContextCompat.getColor(this, R.color.limeade) : ContextCompat.getColor(this, R.color.b4); | |
Integer colorTo = reverse ? ContextCompat.getColor(this, R.color.b4) : ContextCompat.getColor(this, R.color.limeade); | |
Integer colorStatusFrom = reverse ? ContextCompat.getColor(this, R.color.limeade_pressed) : ContextCompat.getColor(this, R.color.dark_grey); | |
Integer colorStatusTo = reverse ? ContextCompat.getColor(this, R.color.dark_grey) : ContextCompat.getColor(this, R.color.limeade_pressed); | |
ValueAnimator colorAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), colorFrom, colorTo); |
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 requests | |
import json | |
import time | |
import RPi.GPIO as GPIO | |
alive = True | |
while(alive): | |
headers = {'token': 'YOUR_TOKEN', 'release':'False'} | |
r = requests.get('https://app.greenhouseci.com/api/projects/YOUR_PROJECT_ID', headers) |
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
/* | |
* Copyright (C) 2014 Square, Inc. | |
* | |
* 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 |
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.support.v7.widget.RecyclerView; | |
import android.view.View; | |
import butterknife.ButterKnife; | |
/** | |
* Created by anthonykiniyalocts on 11/9/15. | |
*/ | |
public abstract class BaseViewHolder extends RecyclerView.ViewHolder { |
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
<style name="MyTheme" parent="Theme.AppCompat"> | |
<item name="drawerArrowStyle">@style/MyDrawerArrowToggle</item> | |
</style> | |
<style name="MyDrawerArrowToggle" parent="Widget.AppCompat.DrawerArrowToggle"> | |
<item name="color">?android:attr/textColorSecondary</item> | |
<item name="middleBarArrowSize">16dp</item> | |
<item name="spinBars">true</item> | |
<item name="thickness">2dp</item> | |
<item name="topBottomBarArrowSize">11.31dp</item> |
NewerOlder