Skip to content

Instantly share code, notes, and snippets.

View Franco-Poveda's full-sized avatar

Pogui Franco-Poveda

  • Mendoza, Argentina
View GitHub Profile
@Franco-Poveda
Franco-Poveda / snapRTSParray.sh
Created July 20, 2018 22:01
get and encode a frame from each element in a array of RTSP hosts, saves output to .jpg file using the last ip octet and timestamp to generate names
#!/bin/bash
declare -a hosts=(
"192.168.0.21"
"192.168.0.22"
"192.168.0.23"
"192.168.0.24"
)
user="user"
pwd="password"
@Franco-Poveda
Franco-Poveda / Dokerfile
Created July 15, 2018 04:20
miniconda 3.4.21 + gcc + make + cython v0.25.2
FROM continuumio/miniconda3:4.3.21
RUN apt-get update && apt-get install build-essential -y
RUN conda install -c anaconda cython=0.25.2 --yes
CMD ["bash"]
@Franco-Poveda
Franco-Poveda / http_lambda.js
Created March 7, 2018 22:22
https request using lambda and nodejs
'use strict';
const https = require('https');
/**
* Pass the data to send as `event.data`, and the request options as
* `event.options`.
* Will succeed with the response body.
*/
exports.handler = (event, context, callback) => {
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');
@Franco-Poveda
Franco-Poveda / AndrianiWS.java
Last active February 7, 2018 19:23
proof of concept: ANDRIANI "Consultar Sucursales" raw WS method call - using handlebars template engine && okHttp request library
package com.mycompany.manualws;
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.FileTemplateLoader;
import com.github.jknack.handlebars.io.TemplateLoader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
@Franco-Poveda
Franco-Poveda / suns.py
Created November 24, 2017 13:38
sunspec device mapper
#!/usr/bin/env python
"""
Copyright (c) 2017, SunSpec Alliance
All Rights Reserved
"""
import sys
import time
@Franco-Poveda
Franco-Poveda / chewer.go
Created September 16, 2017 00:34
paid vaucher files chewer
package main
import (
"bufio"
"encoding/json"
"fmt"
"log"
"os"
"strings"
@Franco-Poveda
Franco-Poveda / autossh.service
Created September 3, 2017 17:49 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@Franco-Poveda
Franco-Poveda / docker_centos7.sh
Created August 29, 2017 05:11
Simple bash script to auto-install docker && docker-compose @ centos7
#!/usr/bin/env bash
# Check for sudo:
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Install Docker CE:
yum -y install -y yum-utils device-mapper-persistent-data lvm2
@Franco-Poveda
Franco-Poveda / getBBR.sh
Created August 23, 2017 00:08
This script enables TCP BBR congestion control. If current linux kernel has no build in BBR support, a newer one is installed.
#!/bin/bash
currentver="$(uname -r | cut -d"-" -f1)"
requiredver="4.9.0"
if [ "$(printf "$requiredver\n$currentver" | sort -V | head -n1)" == "$currentver" ] && [ "$currentver" != "$requiredver" ]; then
echo "No BBR suport in current kernel - installing a newer linux kernel"
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/linux-headers-4.11.0-041100_4.11.0-041100.201705041534_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/linux-headers-4.11.0-041100-generic_4.11.0-041100.201705041534_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/linux-image-4.11.0-041100-generic_4.11.0-041100.201705041534_amd64.deb