Skip to content

Instantly share code, notes, and snippets.

@python273
python273 / line.py
Last active June 8, 2018 10:48
Python line (e.g. timeline) with non-intersecting intervals implementation
# -*- coding: utf-8 -*-
"""
:authors: python273
:license: Apache License, Version 2.0
:copyright: (c) 2018 python273
"""
from functools import reduce
from itertools import chain
from numbers import Number
@bkase
bkase / apps_com.example.appname_BUCK
Last active February 24, 2020 02:00
Kotlin Buck build files
android_binary(
name = 'app',
manifest = 'AndroidManifest.xml',
keystore = ':debug_keystore',
use_split_dex = True,
primary_dex_patterns = [
'^com/tryroll/roll/AppShell^',
'^com/tryroll/roll/debug/AppShell^',
'^com/tryroll/roll/BuildConfig^',
@chemouna
chemouna / RecyclerViewAssertions.java
Last active November 19, 2021 07:16
Some assertions to help with testing recyclerview with espresso.
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.ViewAssertion;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.google.common.truth.Truth;
import java.util.ArrayList;
import org.hamcrest.Matcher;
import org.junit.Assert;
@nbarraille
nbarraille / OrientationChangeAction.java
Last active January 30, 2023 00:04
An Espresso ViewAction that changes the orientation of the screen
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 - Nathan Barraille
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: