Skip to content

Instantly share code, notes, and snippets.

################################################################
# copiar la imagen a la SD y luego crear un archivo llamado "SSH" para activar el ssh y configurarlo remotamente
################################################################
# programa de configuración (activar SSH, configurar WIFI, etc)
sudo raspi-config
# nos agregamos como usuarios
sudo adduser newuser
# nos agregamos como usuarios
sudo adduser nuevouser
# al grupo administradores
sudo gpasswd -a nuevouser adm
# al gruposudo
sudo gpasswd -a nuevouser sudo
# asignar permisos a carpetas
#############################################
# Manage Docker as a non-root user
#############################################
# Create the docker group
sudo groupadd docker
# Add your user to the docker group
sudo usermod -aG docker $USER
# Log out and log back in so that your group membership is re-evaluated
newgrp docker
# Verify that you can run docker commands without sudo
# create two local folders
mkdir -p ~/media/plex/{config,data}
# list all the packages installed on your system
dpkg --list
# remove a package
sudo apt-get remove “package-name”
# remove a package and any personalized settings
# Install Docker
curl -sSL https://get.docker.com | sh
# Add permission to Pi User (or whatever user you are using) to run Docker Commands
sudo usermod -aG docker pi
# Install proper dependencies
sudo apt-get install -y libffi-dev libssl-dev
sudo apt-get install -y python3 python3-pip
sudo apt-get remove python-configparser
@fnovoac
fnovoac / Second.java
Created August 8, 2018 05:21 — forked from NunciosChums/Second.java
EditText validation in MVVM
package kr.changhoonjin.testmvp.view_models;
import android.databinding.ObservableBoolean;
import android.databinding.ObservableField;
import android.databinding.ObservableInt;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.util.Patterns;
import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
public class StringUtil {
public static SpannableString spannableString (String value, int number){
SpannableString s = new SpannableString(value);
s.setSpan(new RelativeSizeSpan(0.7f), s.length() - number, s.length(), 0);
return s;
}
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import com.fernandonovoa.fncspeedcontrol.myApp;
/**
* Created by liukun on 2017/10/9.
import android.util.Log;
public class LogUtil {
public static final int VERBOSE = 1;
public static final int DEBUG = 2;
public static final int INFO = 3;
public static final int WARN = 4;
public static final int ERROR = 5;
public static final int NOTHING = 6;
public static int level = VERBOSE;
public class DynamicUtil {
public static int safeUnbox(java.lang.Integer boxed) {
return boxed == null ? 0 : (int)boxed;
}
public static long safeUnbox(java.lang.Long boxed) {
return boxed == null ? 0L : (long)boxed;
}
public static short safeUnbox(java.lang.Short boxed) {
return boxed == null ? 0 : (short)boxed;
}