Skip to content

Instantly share code, notes, and snippets.

View barbazul's full-sized avatar

Barbazul barbazul

View GitHub Profile
@barbazul
barbazul / docker.crontab
Created May 12, 2021 17:50
Hacky docker clean up solution for my dev environment
# Cleanup Docker weekly
###
# First clear all volumes that are not associated with containers
# This way volumes can live up to 2 weeks without use.
#
15 8 * * 1 docker volume prune
###
# Then clear all images that have not been used in last week.
@barbazul
barbazul / Sarah.coffee
Created November 26, 2018 04:33
Adapted Androminion Sarah AI for Dominiate simulator
# This is a port of the Sarah AI from Androminion for the Dominiate simulator
# Original https://github.com/mehtank/androminion/blob/master/vdom/src/com/vdom/players/VDomPlayerSarah.java
# Simulator http://rspeer.github.io/dominiate/play.html
#
# Sarah has several scripted behaviors for preconstructed kingdoms which are
# ignored in this implementation.
# So what is left is basically the same as Chuck but likes to buy Grand Market
# There is a bias that I left out by which it tends to buy less basic treasures
# if there are 5 or more cards from Cornucopia expansion
#
@barbazul
barbazul / Chuck.coffee
Last active November 26, 2018 04:41
Adapted Androminion Chuck AI for Dominiate simulator
# This is a port of the Chuck AI from Androminion for the Dominiate simulator
# Original https://github.com/mehtank/androminion/blob/master/vdom/src/com/vdom/players/VDomPlayerChuck.java
# Simulator http://rspeer.github.io/dominiate/play.html
#
# Chuck really likes to buy potion cards
# If potion cards are unavailable, he mostly buys random treasures and action
# favoring expensive cards over cheap ones.
# Starts greening when he can afford a Province or Colony or after turn 12
# If there are no potion-cost actions it will at most buy 5 random actions but
# it will never buy Vineyard with less than 5 actions in deck, so sometimes it
@barbazul
barbazul / CODE_OF_CONDUCT.md
Created May 17, 2018 23:26
Código de conducta

Código de Conducta convenido para Contribuyentes

Nuestro compromiso

En el interés de fomentar una comunidad abierta y acogedora, nosotros como contribuyentes y administradores nos comprometemos a hacer de la participación en nuestro proyecto y nuestra comunidad una experiencia libre de acoso para todos, independientemente de la edad, dimensión corporal, discapacidad, etnia, identidad y expresión de género, nivel de experiencia, nacionalidad, apariencia física, raza, religión, identidad u orientación sexual.

Nuestros estándares

Ejemplos de comportamiento que contribuyen a crear un ambiente positivo:

@barbazul
barbazul / PULL_REQUEST_TEMPLATE.md
Last active May 17, 2018 23:27
Modelo de PR para todos los proyectos
  • Por favor verificá que el PR cumpla con estos requerimientos
  • Todos los commits contienen mensajes claros y significativos
  • Todos los cambios fueron probados y validados (para corrección de errores o nuevas funcionalidades)
  • Se agregó / actualizó la documentación correspondiente (para corrección de errores o nuevas funcionalidades)
  • La descripción de este PR y de los commits relacionados sigue el Código de conducta para contribuir
  • ¿Qué cambios introduce el PR? (Bug fix, feature, docs update, ...)
@barbazul
barbazul / README.md
Created December 19, 2017 17:19
Plantilla de README para modulos Magento

${PROJECT_NAME}

Escribir un párrafo describiendo el proyecto. Intentá explicarle al lector, de qué se trata el proyecto.

Build Status

#[[## Referencias]]#

Agregar acá links a los tickets de Redmine que correspondan o a la documentación en Drive

-- Tapo todas las casillas de email que estén configuradas
UPDATE core_config_data SET value = "user@domain.com" WHERE value like '%@%';
-- Piso todas las casillas de correos de clientes que no sean nuestras
UPDATE customer_entity SET email = CONCAT('user', entity_id, '@domain.com')
WHERE email NOT LIKE '%semexpert%';
-- Borro las direcciones de todos los cliente
DELETE FROM customer_address_entity;
@barbazul
barbazul / post-checkout
Created October 8, 2014 18:52
Git post-chekout clear Magento cache
#!/usr/bin/php
<?php
if(file_exists('app/Mage.php')) require 'app/Mage.php';
else require '../../app/Mage.php';
Mage::app();
Mage::getModel('core/cache')->flush();
@barbazul
barbazul / rewrites.php
Last active January 3, 2016 15:19
Detect conflicting rewrites in a Magento installation
<?php
function get_flag($value) {
$value = strtolower($value);
return $value === TRUE || ($value !== 'false' && !!$value);
}
$modules_dir = dir('app/etc/modules/');
$rewrites = array();
$conflicts = array();
@barbazul
barbazul / runcron.php
Created May 8, 2013 17:01
Como disparar el cron de SemExpert_Oca a mano
<?php
include_once 'app/Mage.php';
Mage::app();
Mage::getModel('oca/order_shipment')->job();