Skip to content

Instantly share code, notes, and snippets.

View matt987's full-sized avatar

Carlos Emanuel Mathiasen matt987

View GitHub Profile
@matt987
matt987 / rds.sh
Last active April 11, 2017 14:32 — forked from onyxraven/rds.sh
Amazon RDS Performance Tuning Settings
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB
#/32 = 496630545 = 473MB
#/64 = 248315272 = 236MB
#/128 = 124157636 = 118MB
#/256 = 62078818 = 59MB
#/512 = 31039409 = 29MB
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762
#/25165760 = 623 # half of max_connections = 1993.6MB
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608
#*(3/4) #default innodb pool size = 11922309120
server {
listen 80;
server_name admin.tiendapp.net;
server_name_in_redirect off;
access_log /home/tiendapp/logs/access.log;
error_log /home/tiendapp/logs/error.log;
root /home/tiendapp/api/public/;
@matt987
matt987 / .php
Created September 27, 2016 18:51
PayU SDK
<?php
//Metodo que hace la llamada a PAYU
public function getBanks() {
//Ingrese aquí el nombre del medio de pago
$parameters = array(
//Ingrese aquí el identificador de la cuenta.
PayUParameters::PAYMENT_METHOD => "PSE",
//Ingrese aquí el nombre del pais.
PayUParameters::COUNTRY => PayUCountries::CO,
);
@matt987
matt987 / gist:6508664
Last active December 22, 2015 17:49
Feliz cumpleaños
class HappyBirthday
def initialize
@key = %W(a b c d e f g i j k l m n ñ o p q r s t u v w x y z blanco , ! ? + * _)
set_hash
end
def set_hash
@hash = {}
@key.each_with_index do |char,i|
@hash[char] = 2**i
@matt987
matt987 / gist:6285059
Last active December 21, 2015 09:29
Notes
#Regex to search a specific partial in a project with Sublime2
(render){1}.+[\"\'\:\s]{1}(something){1}[\"\'\:\s]{1}
@matt987
matt987 / loop.rb
Created February 15, 2012 20:02
Loop infinito :p
while yy||= 2 do p yy &&= yy *2 end