Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcos Matamala Fernández asterion

View GitHub Profile
@asterion
asterion / software.sh
Created Jun 27, 2021
software para desktop
View software.sh
#!/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"
View add_column.php
<?php
$setup->getConnection()->addColumn(
$setup->getTable('sales_order'),
'preorder_enable',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
'nullable' => false,
'comment' => 'Pre-Venta',
]
);
View torpedo_php.md

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

php -d memory_limit=1024M
View composer.md

Composer --ignore-platform-reqs

composer install --ignore-platform-reqs
@asterion
asterion / rabbitmq.md
Created Feb 15, 2021
Rabbitmq torpedo
View rabbitmq.md

Crear usuarios

rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
View SSL.md

Inpeccionar SSL

openssl s_client -connect <url>:443

Leer información desde un archivo crt

openssl x509 -text -noout -in certificate.crt
View magento.md

Magento en modo mantenimiento

bin/magento maintenance:enable
bin/magento c:c
bin/magento c:f
bin/magento maintenance:disable
View docker_torpedo.md

Ejecutar comandos con el contenedor

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

Contenedores corriendo

docker ps -a
View php
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 Apr 26, 2018
Listado de tiendas online con productos relacionados a arduino/raspberry
View tiendas.txt
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/