Skip to content

Instantly share code, notes, and snippets.

View kikermo's full-sized avatar

Enrique Ramirez kikermo

  • London
View GitHub Profile
@kikermo
kikermo / androidRemoteDeviceConnection.sh
Last active November 17, 2023 19:27
Simple script that list all Android device connected to a Raspberry Pi via USB and connects your local machine to them over tcp/ip
#!/bin/bash
server="raspberrypi"
devicePort=5555
# Function to display the menu
display_menu() {
clear
echo "===== Connect to ADB device ====="
for ((i=0; i<${#options[@]}; i++)); do
@kikermo
kikermo / mirakle_init.gradle
Created January 11, 2020 09:23
Mirakle configuration ~/.gradle/init.d/mirakle_init.gradle
initscript {
repositories {
jcenter()
}
dependencies {
classpath "com.instamotor:mirakle:1.3.2"
}
}
apply plugin: Mirakle
@kikermo
kikermo / bash_profile
Created January 11, 2020 09:20
Useful aliases. Include in your ~/.bash_profile or ~/.bashrc. Replace angle brackets with your values
## android general build aliases
alias installDebug='adb install -r app/outputs/apk/<your_build_variant_dir>'
alias runDebug='adb shell am start -n <application_id>/<launch_activity>'
alias build='./gradlew assmeble<YourVariant> && installDebug && runDebug'
alias cleanBuild='./gradlew clean assmeble<YourVariant> && installDebug && runDebug'
## Mainframer aliases
alias mf='./mainframer.sh'
@kikermo
kikermo / remoteignore
Last active January 11, 2020 09:07
Mainframer remote ignore <project_dir>/.mainframer/remoteignore
src
@kikermo
kikermo / localignore
Created January 11, 2020 09:05
Mainframer local ignore <project_dir>/.mainframer/localignore
build
@kikermo
kikermo / ignore
Created January 11, 2020 09:01
Mainframer ignore file <project_dir>/.mainframer/ignore
.idea/*
*.iml
*.DS_Store
local.properties
.git
@kikermo
kikermo / config
Created January 11, 2020 08:58
Mainframer config <project_dir>/.mainframer/config
remote_machine=mainframer
local_compression_level=1
remote_compression_level=5
@kikermo
kikermo / config
Created January 11, 2020 08:50
Basic SSH configuration ~/.ssh/config. Replace the parameters inside the angle brackets
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
Host mainframer
User <username_on_remote_machine>
HostName <remote_machiche_location>
Port 22
IdentityFile ~/.ssh/id_rsa.pub
@kikermo
kikermo / environments
Created January 11, 2020 08:44
SDK configuration for Android Build remote server /etc/environments
export ANDOROID_HOME=/usr/lib/android-sdk
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
@kikermo
kikermo / greenhouse.ino
Created September 2, 2019 00:46
Schedule sensor readings on Greenhouse project
#include <Arduino.h>
#include "Timer.h"
int moistureSensorPin = A0;
const int SENSOR_EN_PIN = 13;
#define SAMPLE_PERIOD 10000 // Spacing between sample extraction in miliseconds
Timer timer;