Skip to content

Instantly share code, notes, and snippets.

View luismisanchez's full-sized avatar

Luismi Sánchez luismisanchez

View GitHub Profile
@reanim8ed
reanim8ed / sample.md
Last active July 17, 2022 09:41
[Secrets management] #symfony

Create new secret

  • Generate the keys used to encrypt/decrypt secrets: php bin/console secrets:generate-keys This command generates a pair of keys in config/secrets/dev/ (or config/secrets/prod/). The public key is used to encrypt secrets and you should commit it to your shared repository. The private key should not be committed to the repository and should not be shared in any way.
  • If you already have keys, but want to update them: secrets:generate-keys --rotate
  • Upload the private key to your remote server using SSH or any other safe means and store it in the same config/secrets// directory.
  • Create a new secret to store the contents of DATABASE_URL: php bin/console secrets:set DATABASE_URL or generate new value: php bin/console secrets:set REMEMBER_ME --random
  • Each secret is stored in its own file inside the config/secrets// directory. You can commit these files to the repository because their contents are not accessible unless you also have the private key.
  • Tha
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 26, 2024 08:42
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2024 02:08
FFmpeg cheat sheet
@fevangelou
fevangelou / my.cnf
Last active April 26, 2024 09:12
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
<?php
header('Content-type: text/plain; charset=utf-8');
error_reporting(E_ALL);
ini_set('display_errors', 1);
$script = basename(__FILE__);
$link = $_SERVER['HTTP_HOST'];
// Si venimos desde el botón INSTALAR WORDPRESS
// borramos este archivo y redirigimos al script de instalación de WordPress
@justintadlock
justintadlock / register-post-type.php
Last active October 22, 2023 05:55
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public