Skip to content

Instantly share code, notes, and snippets.

View mikelfo's full-sized avatar

MikelFO mikelfo

View GitHub Profile
@mikelfo
mikelfo / ansible-set-up-playbook.yml
Created February 20, 2020 16:08
Run Ansible on remote machines even when they don't have python installed yet.
# Import this before any roles on your playbooks: `- import_playbook: ansible-set-up-playbook.yml`
---
- name: ansible_set_up
hosts: all
# This Playbook is run as root @see inventory-*.yml files for details about Privilege Escalation for this playbook
become: yes
# @see https://www.linuxschoolonline.com/how-to-use-ansible-even-it-the-target-host-does-not-have-python-installed/
gather_facts: no
# debugger: always
pre_tasks:
@mikelfo
mikelfo / BlogSpam.php
Last active April 4, 2017 08:14
simple Symfony 2.8 service integrating BlogSpam.net free spam filter API
<?php
/**
* Description of BlogSpam.net, Detection for Blog & Forum SPAM free API (v2.0)
* @see https://blogspam.net/api/2.0/
* @note The BlogsSapm.net API supports only HTTP queries.
*
* @version 1.0.2
*
* @requires Buzz HTTP library. https://github.com/sensiolabs/SensioBuzzBundle
* and cUrl (php5-curl), etc.
@mikelfo
mikelfo / ReCaptcha.php
Last active July 17, 2018 13:17
a simple service to use Google reCaptcha on Symfony 2.8
<?php
/**
* Description of recaptcha service which uses the ReCaptcha API by Google
* @see https://www.google.com/recaptcha
* @important Requires a Google account @see https://www.google.com/recaptcha/admin - property "Your property"
*
* @version 1.0.3
*
* @requires Buzz HTTP library. https://github.com/sensiolabs/SensioBuzzBundle
* and cUrl (php5-curl), etc.
@mikelfo
mikelfo / IPInfoDB.php
Created April 1, 2017 21:31
a simple Symfony service implementing IP geolocation using the free IPInfoDB HTTP API (http://ipinfodb.com/ip_location_api.php)
<?php
/**
* Description of Free GeoIP location service by IPInfoDB --Symfony 2.8--
* @see http://www.ipinfodb.com/ip_location_api.php
* @note The IPInfoDB API supports both the http and https API queries.
* @important Requires a valid IPInfoDB account (free)
*
* @version 1.0.1
*
* @requires Buzz HTTP library. https://github.com/sensiolabs/SensioBuzzBundle