Skip to content

Instantly share code, notes, and snippets.

View gonzariosm's full-sized avatar
:octocat:
Deploying

Gonzalo Ríos gonzariosm

:octocat:
Deploying
View GitHub Profile
@gonzariosm
gonzariosm / Xmodmap
Created March 29, 2022 23:12
Xmodmap Apple Keyboard Spanish Latino
keycode 8 =
keycode 9 = Escape NoSymbol Escape
keycode 10 = 1 exclam 1 exclam bar exclamdown bar
keycode 11 = 2 quotedbl 2 quotedbl at oneeighth at
keycode 12 = 3 numbersign 3 numbersign periodcentered sterling periodcentered
keycode 13 = 4 dollar 4 dollar asciitilde dollar asciitilde
keycode 14 = 5 percent 5 percent onehalf threeeighths onehalf
keycode 15 = 6 ampersand 6 ampersand notsign fiveeighths notsign
keycode 16 = 7 slash 7 slash braceleft seveneighths braceleft
keycode 17 = 8 parenleft 8 parenleft bracketleft trademark bracketleft
@gonzariosm
gonzariosm / apache_php_opcache_memcached.json
Created July 15, 2021 22:37
EasyApache 4 Apache + PHP OpCache + Memcached
{
"name" : "Apache MPM Worker + PHP OpCache + Memcached",
"desc" : "",
"pkgs" : [
"ea-apache24",
"ea-apache24-config",
"ea-apache24-config-runtime",
"ea-apache24-mod_bwlimited",
"ea-apache24-mod_cgid",
"ea-apache24-mod_deflate",
@gonzariosm
gonzariosm / info.php
Created July 15, 2021 05:33
PHP Display Info
<?php phpinfo(); ?>
@gonzariosm
gonzariosm / environment
Created July 15, 2021 04:38
Fix warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
LC_ALL="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LANGUAGE="en_US.UTF-8"
@gonzariosm
gonzariosm / httpd-app.conf
Created January 28, 2021 18:17
Bitnami PHPMyAdmin httpd-app.conf
<IfDefine USE_PHP_FPM>
<Proxy "unix:/opt/bitnami/php/var/run/phpmyadmin.sock|fcgi://phpmyadmin-fpm" timeout=300>
</Proxy>
</IfDefine>
<Directory "/opt/bitnami/apps/phpmyadmin/htdocs">
# AuthType Basic
# AuthName phpMyAdmin
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOURBUCKETNAME/*"
}
@gonzariosm
gonzariosm / superstack.rb
Last active September 12, 2020 23:03
Hackerank Ruby Super Stack
operations = ['push 4', 'push 5', 'inc 2 1', 'pop', 'pop']
def superStack(operations)
stack = []
size = 0
operations.each do |operation|
parameters = operation.split
if parameters[0] == "push" then
stack[size] = parameters[1].to_i
<script>
var $_GET = {};
if(document.location.toString().indexOf('?') !== -1)
{
var query = document.location.toString().replace(/^.*?\?/, '').split('&');
for(var i=0, l=query.length; i<l; i++)
{
var aux = decodeURIComponent(query[i]).split('=');
$_GET[aux[0]] = aux[1];
@gonzariosm
gonzariosm / validate.js
Created November 14, 2016 23:20
Validación InstaPage con PlaceHolder Nuevo
ijQuery(document).ready(function() {
// TRADUCCIONES
_Translate.set( 'Processing...', 'Procesando...' );
_Translate.set( 'Please Fix These Errors', 'Por favor, corregir los siguientes errores' );
_Translate.set( 'is required.', 'es necesario.' );
_Translate.set( 'requires a valid number.', 'solo acepta dígitos.' );
ijQuery.validator.addMethod('rut', function(value, element) {
return this.optional(element) || ijQuery.Rut.validar(value);
}, 'no tiene un formato válido.');
@gonzariosm
gonzariosm / script.js
Created November 14, 2016 21:11
Validación de Landing Page Instapage
ijQuery(document).ready(function() {
// TRADUCCIONES
_Translate.set( 'Processing...', 'Procesando...' );
_Translate.set( 'Please Fix These Errors', 'Por favor, corregir los siguientes errores' );
_Translate.set( 'is required.', 'es necesario.' );
_Translate.set( 'requires a valid number.', 'solo acepta dígitos.' );
ijQuery.validator.addMethod('rut', function(value, element) {
return this.optional(element) || ijQuery.Rut.validar(value);
}, 'no tiene un formato válido.');