This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ADD CHEERIO LIBRARY | |
// Script ID : 1ReeQ6WO8kKNxoaA_O0XEQ589cIrRvEBA9qcWpNqdOP17i47u6N9M5Xh0 | |
function extractMetaFAQ(url) { | |
// Récupérez le flux RSS | |
var response = UrlFetchApp.fetch(url); | |
var html = response.getContentText(); | |
const $ = Cheerio.load(html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/python | |
import ShellyPy | |
import sys | |
from pprint import pprint | |
if len(sys.argv) != 3: | |
print("Syntax: [IP] [on/off]\nExample : python3.9 main.py 192.168.1.100 on") | |
sys.exit(0) | |
IP = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function copyPnL(){ | |
var uri = "https://docs.google.com/spreadsheets/d/1pNObB_ETC"; | |
var sheetname = "Sheet 1"; | |
var range = "A1:BS500"; | |
var offsetx = 1; | |
var offsety = 1; | |
COPYSHEET(uri, sheetname, range, offsetx, offsety); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
== How to use == | |
0/ | |
Paste this code in Extensions > Apps Script | |
In Services, search and add "AnalyticsData" and "AnalyticsReportin" | |
1/ Create a sheet called "Reports configuration" | |
* Paste in A1 the following lines : | |
Configuration Options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PLAUSIBLE(url, period, fields) { | |
/** | |
* This function call plausible API, and can be use from Google Sheet | |
* url : The full url to the page | |
* period : control the period. Possible value : "day" (today, default), "6mo", "12mo", "30d", "7d", or "custom&date=2022-04-22,2022-04-22". | |
* fields : by default "visitors,visits,pageviews". A coma separated list of field returned. Can also be bounce_rate, visit_duration | |
* | |
* full doc : https://plausible.io/docs/stats-api#filtering | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Unpivot a pivot table of any size. | |
* All credit to https://gist.github.com/philippchistyakov/57390ec98dcaea4502fabc5a32242b3a | |
* | |
* @param {A1:D30} data The pivot table. | |
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1. | |
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1. | |
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column". | |
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
grafana_graphite: | |
build: . | |
image: kamon/grafana_graphite | |
container_name: kamon-grafana-dashboard | |
ports: | |
- '80:80' | |
- '81:81' | |
- '8125:8125/udp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# charset: utf8 | |
import sys | |
import re | |
import curses | |
from threading import Thread | |
import operator | |
table_count = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SECONDS=20 | |
OUTPUT=/root/es_traffic.txt | |
timeout $SECONDS tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo > $OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# On proxmox 4.x, with a thinlvm setup, mount all running vm disk | |
BASE=/mnt | |
LVM_BASE=/dev/pve | |
#VMS=$(pct list|grep "running"|cut -d' ' -f1) | |
VMS=$(pct list|grep -v "VMID"|cut -d' ' -f1) | |
NewerOlder