Skip to content

Instantly share code, notes, and snippets.

@JcMinarro
JcMinarro / good_morning.yaml
Last active August 18, 2023 08:56 — forked from sergiocasero/good_morning.yaml
Good morning Home Asssistant
description: ""
trigger:
- platform: time
at: "08:00:00"
condition: []
action:
- service: notify.telegram
data:
message: >
{# Change these entities with your's #}

Setting up Emporia Vue 2 whole-home power monitor with ESPHome

Changelog
  • 2022-07-30: add home assistant instructions & MQTT FAQ.
  • 2022-07-16: mention using UART adaptor's RTS pin, thanks to @PanicRide
  • 2022-07-02: mention mqtt is now supported
  • 2022-04-30: bump software version number to 2022.4.0
  • 2022-05-04: mention 64-bit ARM issues in FAQ
### Download Vysor App
https://play.google.com/store/apps/details?id=com.koushikdutta.vysor
- Execute Vysor on Phone
- Enable ADB Settings (Open Developer Options -> Back)
- Enable ADB Debugging
### Download ADB drivers & Install
https://adb.clockworkmod.com/
@JcMinarro
JcMinarro / PackPubBot.groovy
Last active February 1, 2019 08:56
Script that get the free book of the day and send info to slack
#!/usr/bin/groovy
import org.codehaus.jettison.json.JSONObject
import groovyx.net.http.ContentType
import groovyx.net.http.Method
import org.jsoup.Jsoup
import groovyx.net.http.HTTPBuilder
import org.jsoup.nodes.Document
@Grapes( @Grab('org.jsoup:jsoup:1.7.3'))
@Grapes( @Grab('org.codehaus.jettison:jettison:1.3.7'))
@JcMinarro
JcMinarro / Procfile
Created October 5, 2015 13:37 — forked from jordansissel/Procfile
Jenkins on Heroku
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
@JcMinarro
JcMinarro / Executor.java
Created March 19, 2015 13:01
ThreadExecutorExample
/**
* @author Jc Miñarro
*/
public interface Executor<T extends Runnable> {
void run(final T interactor);
}
@JcMinarro
JcMinarro / fragment_films.xml
Created October 19, 2014 10:32
SwipeRefreshLayout Example
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
tools:context="com.jcminarro.android.tools.views.fragments.FilmsFragment">
<android.support.v4.widget.SwipeRefreshLayout
@JcMinarro
JcMinarro / CircularTransformation.java
Last active August 29, 2015 14:07 — forked from donnfelker/CircularTransformation.java
CircularTransformation (Picasso)
import android.graphics.*;
import com.squareup.picasso.Transformation;
/**
* Transforms an image into a circle representation. Such as a avatar.
*/
public class CircularTransformation implements Transformation
{
int radius = 10;
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'hugo'
apply plugin: 'crashlytics'
def versionMajor = 1
def versionMinor = 7
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.