Skip to content

Instantly share code, notes, and snippets.

View PabloCastellano's full-sized avatar
:octocat:

Pablo Castellano PabloCastellano

:octocat:
View GitHub Profile
@MurzNN
MurzNN / element-web-update.sh
Last active October 21, 2021 16:43
element-web-update.sh - bash script for auto-update web version of Element IM to latest version from GitHub vector-im/element-web project releases
#!/bin/bash
###################################################################
# Script for check new version of Element from github
# and download new version, if update is avaiable
#
# https://gist.github.com/MurzNN/ee64f98ab2e71b886c41d55594e5dd9e
#
###################################################################
@jrosell
jrosell / coronavirus-italy-spain-coronavirus.R
Created March 12, 2020 10:35
Brote coranovirus Italia vs España 2020. Modificación de desarrollo inicial @cjgb, que compartió código y datos en https://www.datanalytics.com/2020/03/09/seguimiento-del-coronavirus-en-tiempo-real-con-r/
cran_packages <- c("reshape2","ggplot2")
if (length(setdiff(cran_packages, rownames(installed.packages()))) > 0) {
install.packages(setdiff(cran_packages, rownames(installed.packages())), dependencies=TRUE, repos='http://cran.rstudio.com/')
}
library(reshape2)
library(ggplot2)
primer_brote <- "2020-02-14"
brote_dif <- 9
@nemesifier
nemesifier / openwisp-monitoring-template.json
Last active March 24, 2021 18:14
OpenWISP Monitoring Template
{
"files": [
{
"path": "/usr/sbin/openwisp-monitoring",
"mode": "0744",
"contents": "uuid=$(uci get openwisp.http.uuid)\nkey=$(uci get openwisp.http.key)\nbase_url=$(uci get openwisp.http.url)\nverify_ssl=$(uci get openwisp.http.verify_ssl)\nincluded_interfaces=$(uci get openwisp.monitoring.included_interfaces)\nurl=\"$base_url/api/v1/monitoring/device/$uuid/?key=$key\"\ndata=$(/usr/sbin/netjson-monitoring \"$included_interfaces\")\nif [ \"$verify_ssl\" = 0 ]; then\n curl_command='curl -k'\nelse\n curl_command='curl'\nfi\n# send data via POST\n$curl_command -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$data\" \\\n -v $url\n"
},
{
"path": "/usr/sbin/netjson-monitoring",
"mode": "0744",