Skip to content

Instantly share code, notes, and snippets.

View eavilesmejia's full-sized avatar
🏠
Working from home

Edgard Aviles eavilesmejia

🏠
Working from home
  • Nicaragua
View GitHub Profile
@eavilesmejia
eavilesmejia / fluent-filebeat-comparison.md
Created May 11, 2020 20:15 — forked from StevenACoffman/fluent-filebeat-comparison.md
Fluentd Fluent-bit FileBeat memory and cpu resources

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017
@eavilesmejia
eavilesmejia / postgres_queries_and_commands.sql
Created June 21, 2018 23:57 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@eavilesmejia
eavilesmejia / git-deployment.md
Created March 20, 2018 23:16 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@eavilesmejia
eavilesmejia / letsencrypt_2017.md
Created January 30, 2018 00:57 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@eavilesmejia
eavilesmejia / gist:2ccc741d159978f322445ad6815c6ed0
Created January 16, 2018 11:41 — forked from matthieu/gist:b07c5ba27bc99188a15f
Create and send a Bitcoin transaction using the BlockCypher Transaction API
# In this example we're sending some test bitcoins from an address we control to a brand new test
# address. We'll be sending the coins using the following address, public and private keys (please
# don't abuse).
# address : mtWg6ccLiZWw2Et7E5UqmHsYgrAi5wqiov
# public : 03bb318b00de944086fad67ab78a832eb1bf26916053ecd3b14a3f48f9fbe0821f
# private : 1af97b1f428ac89b7d35323ea7a68aba8cad178a04eddbbf591f65671bae48a2
# 1. generate a one-shot dummy address we're going to send money to
$ curl -X POST http://api.blockcypher.com/v1/btc/test3/addrs
{
$garr = array("AUDI","BMW","MERCEDES-BENZ","AUDIE","BENTLEY","PORSCHE","VOLKSWAGEN");
if( !in_array($vehicle_make,$garr,TRUE)) {
$dv = ($pv*$multiplier)/100;
} else {
$dv = ($pv*1.05*$multiplier)/100;
$german = 'Yes';
}
@eavilesmejia
eavilesmejia / router.php
Created July 11, 2017 17:03 — forked from tamagokun/router.php
Run a Wordpress site via PHP's built-in web server
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
chdir($root);
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/');
set_include_path(get_include_path().':'.__DIR__);
if(file_exists($root.$path))
{
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/')
$path = rtrim($path,'/').'/index.php';
@eavilesmejia
eavilesmejia / gist:6416365
Created September 2, 2013 19:20
Repuesta de el webservice
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.cronos.mobi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:AlertasClienteResponse>
<ns1:AlertasClienteResult>
<alertas>
<alerta numeroCorto="5053737" alerta="" fechaActivacion="20130820" removerServicio=""/>
<alerta numeroCorto="5051919" alerta="" fechaActivacion="20130820" removerServicio=""/>
<alerta numeroCorto="5053737" alerta="" fechaActivacion="20130807" removerServicio=""/>
<alerta numeroCorto="5059797" alerta="" fechaActivacion="20130820" removerServicio=""/>
array (
'status' => 201,
'response' =>
array (
'payment_methods' =>
array (
'excluded_payment_methods' =>
array (
),
'excluded_payment_types' =>