Skip to content

Instantly share code, notes, and snippets.

View gueroverde's full-sized avatar
🏠
Working from home

Miguel Ángel Sánchez Palafox gueroverde

🏠
Working from home
View GitHub Profile
@gueroverde
gueroverde / postgres add auto increment to existing table.txt
Last active April 9, 2019 22:13
postgres add auto increment to existing table
CREATE SEQUENCE foo_a_seq START WITH 15;
ALTER TABLE reports ALTER COLUMN id SET DEFAULT nextval('foo_a_seq');
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.default_enable=1
xdebug.remote_host="docker.for.mac.host.internal"
#xdebug.remote_host="host.docker.internal"
#xdebug.remote_host = "docker.for.win.host.internal"
xdebug.remote_port=9000
xdebug.remote_connect_back=0
docker run -v "./:/opt/notebooks" -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='0.0.0.0' --port=8888 --no-browser --allow-root"
@gueroverde
gueroverde / Docker selenium standalone
Created June 19, 2018 03:41
this up server to chrome driver development
hack@hack:~/develop/infraestructura/selenium$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:2.53.1
@gueroverde
gueroverde / mysql-docker.sh
Created June 5, 2018 17:16 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@gueroverde
gueroverde / pre-commit
Created May 23, 2018 19:58 — forked from barryvdh/pre-commit
phpunit pre-commit git hook
#!/usr/bin/env php
<?php
echo "Running tests.. ";
exec('vendor/bin/phpunit', $output, $returnCode);
if ($returnCode !== 0) {
// Show full output
echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL;
echo "Aborting commit.." . PHP_EOL;
@gueroverde
gueroverde / Self Signed like rootCA
Created January 26, 2018 00:45
Crear certificado autofirmado como rootCA
#!/bin/bash
#
# Variables
#
export COMMON_NAME="John Doe"
export ORGANIZATION="John Doe Organization"
export EMAIL_ADDRESS="[email protected]"
export DOMAIN_NAME="test-domain.dev"
export SUBJECT_ALT_NAME="DNS:${DOMAIN_NAME},DNS:*.${DOMAIN_NAME}"
Este comando es para levantar elastisearch en laradock
sysctl -w vm.max_map_count=262144
To set this value permanently, update the vm.max_map_count setting in
/etc/sysctl.conf.
@gueroverde
gueroverde / Certificado autofirmado self-signed
Last active December 19, 2017 23:26
Certificado auto firmado
openssl genrsa -out "/etc/nginx/ssl/monkeycorp.dev.key" 2048 \
&& openssl req -new -key "/etc/nginx/ssl/monkeycorp.dev.key" -out "/etc/nginx/ssl/monkeycorp.dev.csr" -subj "/CN=monkeycorp.dev/O=monkeycorp/C=UK" \
&& openssl x509 -req -days 365 -in "/etc/nginx/ssl/monkeycorp.dev.csr" -signkey "/etc/nginx/ssl/monkeycorp.dev.key" -out "/etc/nginx/ssl/monkeycorp.dev.crt"
*****update*****
para que el certificado no sea en sha1
openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout techglimpse.com.key -out techglimpse.com.crt
in en el .conf
update tms_tracks set track = 'G5209552' where cod_rastreamento = '1000086703600' and track = '834.ecomerceG5209552';
update tms_tracks set track = 'G5209552' where cod_rastreamento = '1000086703600' and track = '834.ecomerceG5209552';
update tms_tracks set track = 'G5209560' where cod_rastreamento = '1000086703700' and track = '834.ecomerceG5209560';
update tms_tracks set track = 'G5198186' where cod_rastreamento = '1000086699300' and track = '834.ecomerceG5198186';
update tms_tracks set track = 'G5187486' where cod_rastreamento = '1000086673300' and track = '834.ecomerceG5187486';
update tms_tracks set track = 'G5218047' where cod_rastreamento = '1000086715100' and track = '834.ecomerceG5218047';
update tms_tracks set track = 'G5187842' where cod_rastreamento = '1000086666900' and track = '834.ecomerceG5187842';
update tms_tracks set track = 'G5209595' where cod_rastreamento = '1000086704000' and track = '834.ecomerceG5209595';
update tms_tracks set track = 'G5214203' where cod_rastreamento = '10000