Skip to content

Instantly share code, notes, and snippets.

View pascencio's full-sized avatar
💭
Work in progress

Patricio Ascencio Aravena pascencio

💭
Work in progress
  • Santiago, Santiago Metropolitan, Chile
View GitHub Profile
@pascencio
pascencio / maven_java6_settings.xml
Created July 11, 2018 21:11
Setting for older java 6 using maven
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_build_environment/files/default/ci_user/maven_user_settings.xml -->
<profiles>
<profile>
<id>standard-with-extra-repos</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
@pascencio
pascencio / appium.log
Last active March 7, 2018 20:52
Appium 1.7.2
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/patricio/Aplicaciones/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","c3ea38b11f005cf2","shell","getprop","ro.product.manufacturer"]
[debug] [ADB] Current device property 'ro.product.manufacturer': samsung
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [AndroidDriver] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for cl.some.package
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/home/patricio/Aplicaciones/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","c3ea38b11f005cf2","shell","pm","list","packages","cl.some.package"]
@pascencio
pascencio / myql02.ini
Created November 27, 2017 21:55
MySQL 02 Replication on WIndows: Master - Master
[mysqld]
server-id=2
innodb_flush_log_at_trx_commit=1
log-bin="C:/ProgramData/MySQL/MySQL Server 5.6/karibu-mysql02-bin.log"
sync-binlog=1
binlog-format=row
relay-log="C:/ProgramData/MySQL/MySQL Server 5.6/karibu-mysql02-relay.log"
replicate-do-table=karibu.parameterr
@pascencio
pascencio / mysql01.ini
Created November 27, 2017 21:33
MySQL 01 Replication on WIndows: Master - Master
[mysqld]
server-id=1
innodb_flush_log_at_trx_commit=1
log-bin="C:/ProgramData/MySQL/MySQL Server 5.6/karibu-mysql01-bin.log"
sync_binlog=1
binlog-format=row
relay-log="C:/ProgramData/MySQL/MySQL Server 5.6/karibu-mysql01-relay.log"
replicate-do-table=karibu.user
@pascencio
pascencio / step01.sql
Created November 27, 2017 17:00
MySQL 01 Replication on WIndows: Master - Slave
CREATE USER 'srv-repl'@'%' IDENTIFIED BY 'slavepass';
GRANT REPLICATION SLAVE ON *.* TO 'srv-repl'@'%';
@pascencio
pascencio / step02.sql
Created November 27, 2017 16:58
MySQL 02 Replication on WIndows: Master - Slave
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST = '<ip-mysql01>', MASTER_USER = 'srv-repl', MASTER_PASSWORD = 'slavepass', MASTER_LOG_FILE = '<master-log-file>', MASTER_LOG_POS = <master-log-pos>;
START SLAVE;
@pascencio
pascencio / myql02.ini
Created November 27, 2017 16:51
MySQL 02 Replication on WIndows: Master - Slave
[mysqld]
server-id=2
innodb_flush_log_at_trx_commit=1
sync-binlog=1
binlog-format=row
relay-log="C:/ProgramData/MySQL/MySQL Server 5.6/karibu-mysql02-relay.log"
replicate-do-table=karibu.parameter
@pascencio
pascencio / mysql01.ini
Last active November 27, 2017 16:51
MySQL 01 Replication on WIndows: Master - Slave
[mysqld]
server-id=1
innodb_flush_log_at_trx_commit=1
log-bin="C:/ProgramData/MySQL/MySQL Server 5.6/karibu-mysql01-bin.log"
sync_binlog=1
binlog-format=row
@pascencio
pascencio / docker-proxy-env.sh
Last active May 17, 2018 20:45
Docker Proxy Environment for Systemd
#!/bin/sh
cmd=${1}
docker_proxy_file="/etc/systemd/system/docker.service.d/http-proxy.conf"
# Installations instructions:
# sudo curl https://gist.githubusercontent.com/pascencio/c0b391832a733a9b0fedd1343cadeaab/raw/c38e2f43956668f82c0345aaaa927dfcea3c759e/docker-proxy-env.sh -o /usr/bin/docker-proxy-env && sudo chmod +x /usr/bin/docker-proxy-env
reload_docker(){
systemctl daemon-reload
systemctl restart docker
@pascencio
pascencio / filtrar_fin_logs.sh
Created October 30, 2017 15:30
Extraer logs de Weblogic 11g
#!/bin/bash
LIST_ARCHIVOS="$(egrep -l '\<Jan\ 30\,\ 2017\ 4\:.*PM.*\>' *)"
CANT_ARCHIVOS="$(egrep -l '\<Jan\ 30\,\ 2017\ 4\:.*PM.*\>' * | wc -l)"
declare -a ARRAY_ARCHIVOS
declare -a ARRAY_LINEA_INICIAL
declare -a ARRAY_LINEA_FINAL
for (( i=1; i<=$CANT_ARCHIVOS; i++ ))
do