Skip to content

Instantly share code, notes, and snippets.

View thenets's full-sized avatar
🍫
Nothing is true; Everything is permitted

Luiz Felipe F M Costa thenets

🍫
Nothing is true; Everything is permitted
View GitHub Profile
@thenets
thenets / README.md
Last active January 30, 2024 05:54
Playbook example of how to run an arbitrary command and retrieve it's output

How to run an arbitrary command on Ansible

The following example describe how to use the ansible.builtin.shell with Ansible to retrieve a system information and then set it to a variable using ansible.builtin.set_fact.

Requirements

  • Ansible CLI

How to run

@thenets
thenets / json_config_lib.sh
Created September 25, 2021 18:08
Bash functions for JSON editor
#!/bin/bash
# Required packages:
# - python3
# - jq
#
# Install packages:
# - sudo apt-get install python3 jq
set -e
@thenets
thenets / mysql-phpmyadmin.sh
Last active October 17, 2018 15:52
Docker MySQL + phpMyAdmin
#!/bin/bash
NETWORK_NAME=moontech
# Create network
docker network create ${NETWORK_NAME}
# Start MySQL
docker run -d \
--name ${NETWORK_NAME}-mysql \
@thenets
thenets / pokemon_list.csv
Created October 5, 2018 12:25
pokemon_list.csv
Number Name Type1 Type2 Total HP Attack Defense SpecialAtk SpecialDef Speed Generation Legendary
1 Bulbasaur Grass Poison 318 45 49 49 65 65 45 1 FALSE
2 Ivysaur Grass Poison 405 60 62 63 80 80 60 1 FALSE
3 Venusaur Grass Poison 525 80 82 83 100 100 80 1 FALSE
3 VenusaurMega Venusaur Grass Poison 625 80 100 123 122 120 80 1 FALSE
4 Charmander Fire NA 309 39 52 43 60 50 65 1 FALSE
5 Charmeleon Fire NA 405 58 64 58 80 65 80 1 FALSE
6 Charizard Fire Flying 534 78 84 78 109 85 100 1 FALSE
6 CharizardMega Charizard X Fire Dragon 634 78 130 111 130 85 100 1 FALSE
6 CharizardMega Charizard Y Fire Flying 634 78 104 78 159 115 100 1 FALSE
@thenets
thenets / redash-compose.yml
Created August 25, 2018 02:22
Redash 4.0.1 - Docker Compose file
version: '2'
services:
server:
image: redash/redash:4.0.1.b4038
command: server
depends_on:
- postgres
- redis
ports:
- "5000:5000"

Keybase proof

I hereby claim:

  • I am thenets on github.
  • I am thenets (https://keybase.io/thenets) on keybase.
  • I have a public key ASBnrUo_5kIwZkTD0rGTJOYYS1u3vQ6rvbhjzFRWeAvw8Qo

To claim this, I am signing this object:

@thenets
thenets / instal_dadosgovbrschema_for_easyckan.sh
Created November 21, 2017 03:22
Instalador do ckanext-dadosgovbrschema para o EasyCKAN
echo ''
echo "# Installing ckanext-dadosgovbrschema"
echo "# ================================================================================"
echo ''
echo "# Create installer script for ckanext-dadosgovbrschema and install"
DADOSGOVBR_INSTALL='/usr/lib/ckan/default/src/dadosgovbr_install.sh'
DADOSGOVBR_SCHEMA_DIR='/usr/lib/ckan/default/src/ckanext-dadosgovbrschema'
echo "#!/bin/bash" > $DADOSGOVBR_INSTALL
echo "cd /usr/lib/ckan/default/src" >> $DADOSGOVBR_INSTALL
@thenets
thenets / install_easyckan.sh
Created November 17, 2017 08:13
How to install EasyCKAN
#!/bin/bash
curl -sSL https://raw.githubusercontent.com/thenets/Easy-CKAN/master/install_easyckan.sh | sudo bash
sudo easyckan install
@thenets
thenets / install_easyckan_dadosgovbrschema.sh
Created November 12, 2017 16:31
Instalador do EasyCKAN integrado ao ckanext-dadosgovbr
#!/bin/bash
# ================================================================================
# EasyCKAN integrado ao dadosgovbr/ckanext-dadosgovbrschema
#
# Requisitos:
# - Instale o "curl": apt-get install -y curl
# - Precisa ser executado como root.
#
#
@thenets
thenets / clear_harvest_packages.sh
Last active October 27, 2017 14:28
ckanext-harvest Delete all datasets harvested from source
#!/bin/bash
# Settings
CONFIG_FILE='/etc/ckan/default/development.ini'
PACKAGES_NAME_FILE='/tmp/harvest_packages_names'
SQL_FILE='/etc/ckan/clear_harvest_packages.sql'
# DON'T CHANGE THE CONTENT BELOW!!!
# =====================================================================
PASTER='/usr/lib/ckan/default/bin/paster'