Skip to content

Instantly share code, notes, and snippets.

Juan A. S. okelet

Block or report user

Report or block okelet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@okelet
okelet / test.ps1
Created Sep 10, 2019
Test Powershell
View test.ps1
Write-Host "Congratulations! Your first script executed successfully"
View PHP Lambda layer for PHP.md
View bootstrap
#!/opt/bin/php -d memory_limit=-1
<?php
// Adapted from https://aws.amazon.com/es/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/
// This invokes Composer's autoloader so that we'll be able to use Guzzle and any other 3rd party libraries we need.
require __DIR__ . '/vendor/autoload.php';
function getNextRequest()
{
@okelet
okelet / user-data-amazon-linux-1.sh
Last active Mar 15, 2018
Simple AWS user data (basic HTTP server for many distributions)
View user-data-amazon-linux-1.sh
#!/bin/bash
yum install -y httpd
echo -e "You know nothing, Jon Snow.<br>\nSent from $(curl http://instance-data/latest/meta-data/instance-id)" > /var/www/html/index.html
touch /var/www/html/health.txt
service httpd start
@okelet
okelet / README.md
Last active Jun 18, 2018
Graylog Zabbix monitoring
View README.md

Graylog Zabbix monitoring

The bash script creates a user with the permissions required to monitor the journal and get metrics.

The second file is a template for Zabbix (requires Zabbix 3.4); this template collects the following data:

  • Balancer status for the node
  • Journal: current size
  • Journal: max size
@okelet
okelet / gnome-ext-install.sh
Last active Feb 8, 2018 — forked from thefekete/gnome-ext-install.sh
Bash script to install extensions from the command line. *Use at your own risk!*
View gnome-ext-install.sh
#!/bin/bash
set -e
set -u
version="0.0"
usage="$(basename $0) version $version
usage:
$(basename $0) install <extension-uuid> [<extension-id/uuid> ... ]
@okelet
okelet / README.md
Created Aug 7, 2017
Python 3 script to add/remove elements in gconf/dconf
View README.md

Usage

Remove elements:

python3 gsettings_list.py com.canonical.Unity.Launcher favorites application://uniquity.desktop --op remove
python3 gsettings_list.py com.canonical.Unity.Launcher favorites application://org.gnome.Software.desktop --op remove
python3 gsettings_list.py com.canonical.Unity.Launcher favorites application://ubuntu-amazon-default.desktop --op remove
python3 gsettings_list.py com.canonical.Unity.Launcher favorites application://unity-control-center.desktop --op remove
View .ansible.cfg
[defaults]
host_key_checking = False
inventory = ~/ansible_hosts.ini
library = ~/.ansible/library
display_skipped_hosts = True
nocows = 1
roles_path = ~/.ansible/roles:/etc/ansible/roles
@okelet
okelet / output.txt
Created Jul 3, 2014
Salida del comando mysql_secure_installation en Debian 7.5 (Wheezy)
View output.txt
/usr/bin/mysql_secure_installation: 379: /usr/bin/mysql_secure_installation: find_mysql_client: not found
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
You can’t perform that action at this time.