Skip to content

Instantly share code, notes, and snippets.

View JonathanPorta's full-sized avatar
🎯
Focusing

Jonathan Porta JonathanPorta

🎯
Focusing
View GitHub Profile
[Unit]
Description=Ensure that the node_exporter process is running
After=network-online.target
[Service]
User=node-exporter
Group=node-exporter
Restart=always
ExecStart=/opt/node-exporter/node-exporter
Type=simple
[Unit]
Description=Ensure that the prometheus process is running
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Restart=always
WorkingDirectory=/opt/prometheus
ExecStart=/opt/prometheus/prometheus --config.file=prometheus.yml
[Unit]
Description=Ensure that the grafana process is running
After=network-online.target
[Service]
User=grafana
Group=grafana
Restart=always
WorkingDirectory=/opt/grafana/
ExecStart=/opt/grafana/bin/grafana-server web
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' open.scdn.co www.google-analytics.com cdn.ravenjs.com vt.myvisualiq.net www.gstatic.com". Either the 'unsafe-inline' keyword, a hash ('sha256-exNIbRoBufGA8Xw81IIBBDk1C1yh5NkucdznLehlx2g='), or a nonce ('nonce-...') is required to enable inline execution.
rocket%20league:1 The SSL certificate used to load resources from https://audio-akp-spotify-com.akamaized.net will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information.
3rocket%20league:1 Failed to load https://audio-akp-spotify-com.akamaized.net/audio/8af5e6367293321b87a6c98464b9a5ccdb9cfffc?__token__=exp=1520453659~hmac=24db9db34f046bed5e4b579d1e0335a461626b71f308fcd5d9f168ae00e88fa5: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resourc
@JonathanPorta
JonathanPorta / setup_collectd.sh
Created May 2, 2018 08:56
Throw some configs around for OpenWRT routers.
#!/bin/ash
opkg update
opkg install collectd
. /etc/init.d/collectd enable
. /etc/init.d/collectd start
opkg install luci-app-statistics collectd-mod-rrdtool collectd-mod-processes collectd-mod-interface collectd-mod-iptables collectd-mod-netlink collectd-mod-cpu collectd-mod-curl collectd-mod-df collectd-mod-disk collectd-mod-dns collectd-mod-interface collectd-mod-iptables collectd-mod-load collectd-mod-irq collectd-mod-memory collectd-mod-network collectd-mod-ntpd collectd-mod-openvpn collectd-mod-ping collectd-mod-processes collectd-mod-thermal collectd-mod-uptime collectd-mod-users collectd-mod-wireless collectd-mod-vmem libnetsnmp liboping libcurl
@JonathanPorta
JonathanPorta / TableView.js
Created August 14, 2018 22:12
Plopping a copy down here before the big ol'
import React from 'react'
import { Link } from 'react-router-dom'
const TableView = props => (
<div class="row m-b-20">
<div class="col-xs-12 col-lg-9">
<h4> Watches </h4>
<p>All watches</p>
</div>
<div class="col-xs-12 col-lg-3">
@JonathanPorta
JonathanPorta / gdrpCheck.js
Last active May 22, 2019 07:57
Naive check to determined if the visitor should be shown the GDPR notice.
function locale(){
if (navigator.languages != undefined)
return navigator.languages[0];
else
return navigator.language;
}
function showGdprNotice(){
const gdprCountries = [
@JonathanPorta
JonathanPorta / unbork_wifi.service
Created July 4, 2019 20:16
Fixes issue with Wifi on MacBook Pro becoming permanently disabled (until you reload the kernel module) after machine wakes up from suspend.
[Unit]
Description=Unload and reload the wifi module after computer resumes from suspend.
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStart=/bin/bash -c "/usr/sbin/rmmod brcmfmac && /usr/sbin/modprobe brcmfmac"
TimeoutSec=0
StandardOutput=syslog
@JonathanPorta
JonathanPorta / UseXboxOneControlleronFedora.md
Created December 21, 2019 18:47 — forked from ddrpa/UseXboxOneControlleronFedora.md
Use Xbox One Controller on Fedora
dnf search kernel-modules-extra
@JonathanPorta
JonathanPorta / UseXboxOneControlleronFedora.md
Created December 21, 2019 18:47 — forked from ddrpa/UseXboxOneControlleronFedora.md
Use Xbox One Controller on Fedora
dnf search kernel-modules-extra