Skip to content

Instantly share code, notes, and snippets.

View workglue.json
{"message":"Time cards found","data":{"id":"20200509","isApproved":false,"canApprove":false,"startTime":"2020-05-03","endTime":"2020-05-09","totalTime":112500,"days":[{"day":2,"totalTime":10800,"jobs":[{"name":"Green Field Exterior bldg 55","events":[{"date":"2020-05-05 08:00:00","type":1},{"date":"2020-05-05 16:35:00","type":4}]}]},{"day":3,"totalTime":28800,"jobs":[{"name":"Green Field Exterior bldg 55","events":[{"date":"2020-05-06 08:00:00","type":1},{"date":"2020-05-06 13:00:00","type":4},{"date":"2020-05-06 13:30:00","type":1},{"date":"2020-05-06 16:30:00","type":4}]}]},{"day":4,"totalTime":28800,"jobs":[{"name":"Green Field Exterior bldg 55","events":[{"date":"2020-05-07 08:00:00","type":1},{"date":"2020-05-07 13:00:00","type":4},{"date":"2020-05-07 13:30:00","type":1},{"date":"2020-05-07 16:30:00","type":4}]}]},{"day":5,"totalTime":22500,"jobs":[{"name":"Santa Cruz House Exterior","events":[{"time":22500,"type":5}]}]},{"day":6,"totalTime":21600,"jobs":[{"name":"Paid Time Off","events":[{"date":"2020-0
@Tadas44
Tadas44 / BaseFragment.kt
Created Jul 20, 2019
RxJava MVVM example
View BaseFragment.kt
open class BaseFragment : Fragment() {
private var disposable = CompositeDisposable()
fun Disposable.addToDisposable() {
disposable.add(this)
}
override fun onDestroyView() {
super.onDestroyView()
disposable.clear()
View dataseries_upload.json
{
"data": [{
"dataserie": "12312",
"user": "petrr",
"date": "2017-06-29T10:00:00.000Z",
"selopt_type": "numbers",
"selopt_values": ["1", null, "3"],
"selopt_notes": ["note1", null, "note3"]
}, {
"dataserie": "12313",
View sopra.json
//Locations API call
{
locations: [
{
"id": 12,
"name": "Camorino"
},
{
"id": 11,
"name": "Cazis"
@Tadas44
Tadas44 / circle.yml
Created Dec 6, 2016
CircleCi Android Configuration
View circle.yml
dependencies:
pre:
# Android SDK Platform 24
- if [ ! -d "/usr/local/android-sdk-linux/platforms/android-24" ]; then echo y | android update sdk --no-ui --all --filter "android-24"; fi
# Android SDK Build-tools, revision 25.0.1
- if [ ! -d "/usr/local/android-sdk-linux/build-tools/25.0.1" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-25.0.1"; fi
# Android Support Repository, revision 40 / Local Maven repository for Support Libraries
- if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/support-v4/25.0.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
# Google Support Repository, revision 40 / Local Maven repository for Support Libraries
- if [ ! -d "/usr/local/android-sdk-linux/extras/google/m2repository/com/google/firebase/firebase-core/10.0.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"; fi
@Tadas44
Tadas44 / espresso_2_static_imports
Created Feb 4, 2015
Espresso 2 common static imports
View espresso_2_static_imports
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.Espresso.pressBack;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
import static android.support.test.espresso.action.ViewActions.swipeUp;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
@Tadas44
Tadas44 / BadgeUtils
Created Sep 15, 2014
Launcher icon notification for Samsung and Sony Xperia devices
View BadgeUtils
public class BadgeUtils {
public static void setBadge(Context context, int count) {
setBadgeSamsung(context, count);
setBadgeSony(context, count);
}
public static void clearBadge(Context context) {
setBadgeSamsung(context, 0);