Skip to content

Instantly share code, notes, and snippets.

View DawidvanGraan's full-sized avatar

Dawid van Graan DawidvanGraan

View GitHub Profile
@JoooostB
JoooostB / automations.yaml
Created November 14, 2018 07:08
esp8266-mqtt-doorbell - automations:
- alias: Deurbel Notificatie
trigger:
platform: mqtt
topic: stat/frontdoor/doorbell
payload: 'ringing'
action:
- service: notify.pushover
data:
message: "There's someone in front of your door"
title: "Ding Dong!"
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
@adavis
adavis / BeforeLoginActivityTest.java
Last active April 7, 2022 13:58
Using Screen Robots with Android Espresso Tests
package <your_package>;
import android.support.test.espresso.intent.rule.IntentsTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@dlew
dlew / File.java
Created March 1, 2016 20:46
Automated onError() message generation
public static Action1<Throwable> crashOnError() {
final Throwable checkpoint = new Throwable();
return throwable -> {
StackTraceElement[] stackTrace = checkpoint.getStackTrace();
StackTraceElement element = stackTrace[1]; // First element after `crashOnError()`
String msg = String.format("onError() crash from subscribe() in %s.%s(%s:%s)",
element.getClassName(),
element.getMethodName(),
element.getFileName(),
element.getLineNumber());
@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created January 9, 2016 15:34
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* 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
@mitchwongho
mitchwongho / pseudo-enum.java
Created October 28, 2015 08:22
A enum replacement
import com.google.auto.value.AutoValue;
/**
*
*/
@AutoValue
public abstract class PseudoEnum {
public static PseudoEnum MONDAY() {
return new AutoValue_PseudoEnum(0);
@krishamoud
krishamoud / app.config
Last active June 3, 2019 11:18
Deploy Meteor onto Elastic Beanstalk
option_settings:
- option_name: AWS_SECRET_KEY
value: -------------------------------------------
- option_name: AWS_ACCESS_KEY_ID
value: ------------------------------
- option_name: PORT
value: 8081
@frankyonnetti
frankyonnetti / CSS--hex-opacity-values.css
Last active December 8, 2023 05:56
#css Hex Opacity Values
/*
* Hex Opacity Values
*/
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.