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
bool validateNIF(String value){ | |
var validChars = 'TRWAGMYFPDXBNJZSQVHLCKET'; | |
RegExp nifRegex = new RegExp(r'^[0-9]{8}[TRWAGMYFPDXBNJZSQVHLCKET]$'); | |
var str = value.toString().toUpperCase(); | |
if (!nifRegex.hasMatch(str)) return false; | |
String nie = str | |
.replaceAll(new RegExp(r"/^[X]/"), '0') |
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
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys / | |
https://ubuntuforums.org/showthread.php?t=35087 | |
restore: | |
tar xvpfz backup.tgz -C / |
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
private void getPlaces(){ | |
mDataManager.getPlaces() | |
.flatMapIterable(placesDtos -> placesDtos) | |
.map(Place::mapper) | |
.toList() | |
.subscribeOn(Schedulers.newThread()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(places -> { | |
getMvpView().setPlaces(places); |
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
3 3 * * * mongodump --out /var/backups/mongobackups/`date +"\%m-\%d-\%y"`;python /home/user/gcloud/gdcp upload -p folderId /var/backups/mongobackups/`date +"\%m-\%d-\%y"`; | |
3 1 * * * find /var/backups/mongobackups/ -mtime +7 -exec rm -rf {} \; |