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
from firebase import firebase | |
import json | |
bifrost = firebase.FirebaseApplication('https://bifrost.firebaseio.com/', None) | |
sims = bifrost.get('/sims', None) | |
avgs = {} | |
for sim in sims: |
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
# Listening | |
nc -l -p 1234 > out.file | |
# Sending | |
nc -w 3 [destination] 1234 < out.file |
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
\definecolor{light-gray}{gray}{0.95} | |
\definecolor{yellow}{RGB}{255, 251, 140} | |
% single line code blocks with monospace font and light-gray background (StackOverflow style) | |
\newcommand{\code}[1]{\colorbox{light-gray}{\texttt{#1}}} | |
% note command | |
\newcommand{\todo}[1]{\colorbox{yellow}{\textbf{\#TODO} #1}} |
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
signingConfigs { | |
releaseSigning { | |
storeFile file(System.getenv("ANDROID_KEYSTORE")) | |
storePassword System.console().readPassword("\nStore password: ").toString() | |
keyAlias System.getenv("ANDROID_KEYALIAS") | |
keyPassword System.console().readPassword("Key password: ").toString() | |
} | |
} | |
buildTypes { |
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
Atom settings sync |
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
/** | |
* Custom matcher that checks if a list is equal to expected when elements don't have equals() | |
* using {@link ReflectionEquals}. | |
*/ | |
public static ArgumentMatcher<List> equalsList(List expectedList) { | |
return new ArgumentMatcher<List>() { | |
@Override | |
public boolean matches(Object argument) { | |
List list = (List) argument; | |
boolean assertion; |
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
/* --- Log functions with Tag as caller class name --- */ | |
inline fun <reified T: Any> T.logD(text: String) { | |
Log.d(T::class.java.simpleName, text) | |
} | |
inline fun <reified T: Any> T.logE(text: String) { | |
Log.e(T::class.java.simpleName, text) | |
} |
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
<TextView | |
android:layout_width="0dp" | |
android:layout_height="wrap_content" | |
android:ellipsize="end" | |
android:maxLines="1"/> |
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 java.lang.ref.WeakReference | |
/** | |
* Base Interface for all the presenters. | |
* | |
* @param T The type of view (which extends [View]) the presenter is controlling. | |
*/ | |
interface PresenterApi<in T : View> { | |
fun onAttach(v: T) | |
fun onDetach() |
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 io.reactivex.Observable | |
import io.reactivex.disposables.CompositeDisposable | |
import io.reactivex.disposables.Disposable | |
import io.reactivex.observers.DisposableObserver | |
import io.reactivex.subjects.BehaviorSubject | |
import io.reactivex.subjects.PublishSubject | |
interface ViewState |
OlderNewer