git clone git@github.com:jcc/blog.git && cd \ && composer install && npm install
cp .env.example .env
Cambiar la paqueteria de fzaninotto/faker a requerido
fzaninotto/faker
composer update && npm run production
echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
Eliminar las cosas de gitignore
heroku create
heroku buildpacks:add heroku/php
php artisan key:generate --show
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
defaultConfig { | |
... | |
//See more in: https://source.android.com/devices/tech/dalvik | |
multiDexEnabled true | |
... |
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
fun hashAndSavePasswordHash(context: Context, clearPassword: String) { | |
val digest = MessageDigest.getInstance("SHA-1") | |
val result = digest.digest(clearPassword.toByteArray(Charsets.UTF_8)) | |
val sb = StringBuilder() | |
for (b in result) { | |
sb.append(String.format("%02X", b)) | |
} | |
val hashedPassword = sb.toString() | |
val sharedPref = PreferenceManager.getDefaultSharedPreferences(context) | |
val editor = sharedPref.edit() |
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
@Suppress("unused") | |
abstract class BaseActivity : AppCompatActivity() { | |
private lateinit var inputMethodManager: InputMethodManager | |
... | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
... | |
inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager |