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
jshell> LocalDate ld1 = LocalDate.now(); | |
ld1 ==> 2019-04-23 | |
jshell> LocalDate ld2 = LocalDate.parse("2019-01-01"); // Date | |
ld2 ==> 2019-01-01 | |
jshell> LocalDate ld3 = LocalDate.of(2019, 1, 1); // Year, Month, Day | |
ld3 ==> 2019-01-01 | |
jshell> LocalDate ld4 = LocalDate.of(2019, Month.JANUARY, 1); // Year, Month, Day |
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
jshell> LocalTime lt1 = LocalTime.now(); | |
lt1 ==> 21:22:05.322393 | |
jshell> LocalTime lt2 = LocalTime.parse("12:00"); | |
lt2 ==> 12:00 | |
jshell> LocalTime lt3 = LocalTime.of(12, 0); // Hour, minutes | |
lt3 ==> 12:00 | |
jshell> LocalTime lt4 = LocalTime.of(12, 0, 1); // Hour, minutes, seconds |
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
<select class="custom-select form-control" id="exp-year"> | |
<option value="2019">2019</option> | |
<option value="2020">2020</option> | |
<option value="2020">2021</option> | |
<option value="2020">2022</option> | |
<option value="2023">2023</option> | |
</select> |
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
<select class="custom-select form-control" id="exp-month"> | |
<option value="1">1 - January</option> | |
<option value="2">2 - February</option> | |
<option value="3">3 - March</option> | |
<option value="4">4 - April</option> | |
<option value="5">5 - May</option> | |
<option value="6">6 - June</option> | |
<option value="7">7 - July</option> | |
<option value="8">8 - August</option> | |
<option value="9">9 - September</option> |
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
<div class="form-row"> | |
<div class="col-lg-6 form-group"> | |
<label for="cc-num">Card Number:</label> | |
<input class="form-control" id="cc-num" type="text"> | |
</div> | |
<div class="col-lg form-group"> | |
<label for="zip">Zip Code:</label> | |
<input class="form-control" id="zip" type="text"> | |
</div> |
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
wp core download --locale=es_MX | |
wp core config --dbname=site_com --dbuser=site --dbpass=password --dbhost=localhost | |
wp core install --url=https://site.com --title="Site" --admin_name=site_@dm1n --admin_email=juan@juanpabloprado.com --admin_password=password |
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
user ashley; | |
worker_processes 1; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
} | |
http { |
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
#!/bin/bash | |
cd /var/www/html | |
NOW=$(date +%Y%m%d) | |
SQL_FILE=${NOW}_database.sql | |
# Backup database | |
wp db export ../backups/$SQL_FILE --add-drop-table |
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
alias gl='git log --oneline --all --graph --decorate $*' |
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 com.juanpabloprado.ui.activity; | |
import android.app.ProgressDialog; | |
import android.support.v7.app.AppCompatActivity; | |
public abstract class ActivityWithProgressDialog extends AppCompatActivity { | |
private ProgressDialog mProgressDialog; | |
public void showProgressDialog() { |