Skip to content

Instantly share code, notes, and snippets.

View asterion's full-sized avatar

Marcos Matamala Fernández asterion

View GitHub Profile
@asterion
asterion / software.sh
Created June 27, 2021 23:27
software para desktop
#!/bin/bash
sudo apt install -y tree bc vim htop curl wget ubuntu-restricted-extras rar unrar p7zip-full p7zip-rar ubuntu-gnome-desktop gnome-session gdm3 chrome-gnome-shell terminator docker docker-compose git php-cli php-curl rsync gnome-tweaks
sudo snap install vlc
sudo update-alternatives --config editor
git config --global color.ui true
git config --global color.diff.meta "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.status.added "green bold"
git config --global color.status.changed "yellow"
@asterion
asterion / add_column.php
Created June 11, 2021 19:59
add column
<?php
$setup->getConnection()->addColumn(
$setup->getTable('sales_order'),
'preorder_enable',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
'nullable' => false,
'comment' => 'Pre-Venta',
]
);
@asterion
asterion / torpedo_php.md
Last active April 25, 2021 13:43
Torpedo PHP

Definir uso de memoria para ejecutar php en línea de comando

php -d memory_limit=1024M
@asterion
asterion / composer.md
Created February 19, 2021 11:33
Composer

Composer --ignore-platform-reqs

composer install --ignore-platform-reqs
@asterion
asterion / rabbitmq.md
Created February 15, 2021 11:41
Rabbitmq torpedo

Crear usuarios

rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
@asterion
asterion / SSL.md
Last active February 15, 2021 11:48
SSL

Inpeccionar SSL

openssl s_client -connect <url>:443

Leer información desde un archivo crt

openssl x509 -text -noout -in certificate.crt
@asterion
asterion / magento.md
Last active April 18, 2022 15:07
Magento

Magento en modo mantenimiento

bin/magento maintenance:enable
bin/magento c:c
bin/magento c:f
bin/magento maintenance:disable
@asterion
asterion / docker_torpedo.md
Last active August 6, 2024 14:50
docker torpedo

Ejecutar comandos con el contenedor

docker-compose run --rm [nombre] [command]

Contenedores corriendo

docker ps -a
@asterion
asterion / php
Created March 28, 2019 21:48
ropuesta
public function add_instagram_profile(){
$filename = sprintf('/tmp/profile.clapesuc.%s.json', date('Ymd'));
if (file_exists($filename)) {
$json = json_decode(file_get_contents($filename));
} else {
$url = 'https://api.instagram.com/v1/users/'.$this->instagram_uid.'?access_token='.$this->instagram_token;
$text = file_get_contents($url);
$json = json_decode($text);
@asterion
asterion / tiendas.txt
Last active April 26, 2018 21:02
Listado de tiendas online con productos relacionados a arduino/raspberry
http://cycom.cl/
http://electronicadelsurltda.cl/
http://kowka.cl/
http://rambal.com/
http://www.electronica.cl/productos/
http://www.hmtechtronic.cl/
http://www.hubot.cl/
http://www.maxelectronica.cl/
http://www.mcielectronics.cl/
http://www.mundoreballing.cl/