Skip to content

Instantly share code, notes, and snippets.

View alex-moreno's full-sized avatar

Alejandro Moreno alex-moreno

View GitHub Profile
@gimenete
gimenete / readme.md
Last active March 9, 2024 16:36
Notas para orientación profesional como programador

Tras este tweet que publiqué

He sido freelance, emprendedor y trabajo desde hace años para empresas USA de diversos tamaños en remoto como programador fullstack. Ahora en GitHub. Si puedo ayudar a alguien en orientar su carrera, mis DMs están abiertos. Ask me anything.

he recibido muchos mensajes y escribo aquí algunos de los consejos que he dado en resumen. Nota: algunas cosas son concretas de trabajar en España. Si vas a trabajar desde Sudamérica sólo una nota: tienes la ventaja de la zona horaria para trabajar con EEUU.

Inglés

Tener un buen nivel de inglés es fundamental para poder trabajar con clientes extranjeros. El conocimiento del idioma tiene que mantenerse en el tiempo. Es como mantenerse en forma física; si lo dejas, lo pierdes. Personalmente aunque trabajo 100% en inglés desde hace bastantes años, intento crearme un entorno diario con el idioma para no perderlo:

@daggerhart
daggerhart / MODULENAME.install.php
Last active September 5, 2020 05:23
Drupal 8 file field to media entities simple migration. Does not move files in filesystem, just creates new media entities.
<?php
/**
* Create media entities from existing file fields.
*
* @link https://chromatichq.com/blog/migrating-drupal-file-fields-media-entities-without-migrate-module
*/
function MODULENAME_update_8001() {
// Nodes types that will get media migrated.
$node_types = ['article','event','page','session','sponsor'];
// Map old file fields => new media fields.
@jleehr
jleehr / gist:7ac2a5de785881dfce99f7034547f07b
Last active May 25, 2023 11:02
Drupal 8 - Migrate from public to private files
# Enable maintanance mode
drush state-set system.maintenance_mode 1
# Backup file field data
drush sql-query "CREATE TABLE media__field_file_bak AS SELECT * FROM media__field_file;"
drush sql-query "CREATE TABLE media_revision__field_file_bak AS SELECT * FROM media_revision__field_file;"
# Truncate file field tables (need to change storage settings)
drush sql-query "TRUNCATE media__field_file;"
drush sql-query "TRUNCATE media_revision__field_file;"
@pjmazenot
pjmazenot / docker-install-lubuntu-17.04.sh
Last active March 14, 2021 17:52
Install Docker CE on Lubuntu 17.04
#!/bin/sh
# Install Docker CE on Lubuntu 17.04
# Run this script with sudo privileges `sudo docker-install-lubuntu-17.04.sh`
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
apt-get update
apt-get install -y docker-ce
@Partyschaum
Partyschaum / README.md
Last active November 26, 2020 13:15
Install PHP 7.2.0 with latest pthreads extension
$ phpbrew install php-7.2.0 +default -- --with-thread-safety --enable-maintainer-zts --with-tsrm-pthreads --with-openssl=/usr/local/opt/openssl`
$ phpbrew ext install github:krakjoe/pthreads master
@japerry
japerry / default.local.settings.php
Created September 11, 2017 22:23
Example multisite local settings file.
<?php
/**
* @file
* Local development override configuration feature.
*/
use Symfony\Component\Yaml\Yaml;
if (file_exists($dir . '/blt/project.yml')) {
@grasmash
grasmash / acsf-cm.md
Last active August 22, 2022 15:31
Configuration management best practices for ACSF.

This tutorial covers common use cases for configuration splits as a strategy for configuration management in Drupal 8.

Specifically it covers:

  • Default application configuration
  • Environment specific configuration (e.g., local, data, test, prod, etc.)
  • Site-specific configuration (when multisite is used)
  • "Feature" specific configuration (e.g. a distinct blog feature that is shared across multiple sites). Not to be confused with the features module.
  • Miscellaneous troubleshooting information
@FinBoWa
FinBoWa / xdebug-off.sh
Last active December 12, 2017 00:07
Xdebug on
#/bin/sh
CURRENT_USER=`whoami`
if [ "$CURRENT_USER" == "vagrant" ]; then
cd /vagrant; ./xdebug.sh off
else
vagrant ssh -c "cd /vagrant; sudo ./xdebug.sh off"
fi
<?php
/**
* This plugin creates a new paragraph entity based on the source.
*
* @MigrateProcessPlugin(
* id = "mds_paragraph"
* )
*/
class ParagraphMigrateProcessor extends ParagraphProcessBase {
@davidkryzaniak
davidkryzaniak / lightsail-docker.sh
Created December 3, 2016 04:52
Auto-Install Docker on AWS Lightsail
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
sudo service docker start
sudo docker pull php:5.6-apache