This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################ | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
NewerOlder