Skip to content

Instantly share code, notes, and snippets.

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
#!/bin/bash
# Install Kubernetes for Raspberry Pi cluster
echo "Kube Init";
sudo kubeadm init --pod-network-cidr 10.244.0.0/16 --token-ttl 0
sleep 200
echo "Create hidden directory of kube";
mkdir -p $HOME/.kube;
@magikcypress
magikcypress / gist:1870cb397355c2cd986e30be0c3b9f74
Created November 7, 2020 13:04
Get specific app Qlik Sense
var Promise = qlik.Promise;
qlik.getGlobal(config).getAppList(function(list)
{
return new Promise(function(resolve, reject) {
setTimeout(function() {
$.each(list, function(key, value) {
if(value.qDocName == "Portail Agent" && value.qMeta.stream.name == "SDI") {
var idApp = value.qDocId;
//get openApp -- inserted here --
var app = qlik.openApp('' + idApp + '', config);
@magikcypress
magikcypress / replace-date-timestamp-date-csv.md
Last active February 21, 2021 15:48
Replace field into column csv file bash script

Replace field into column csv file bash script

First command is more faster than second

Exemple file

    1613667679,TXT,google.com,8.8.8.8,4,0,4,0,N/A,2,N/A
    1613667679,TXT,google.com,,8.8.8.8,4,0,4,0,N/A,2,N/A
    1613667679,TXT,google.com,,8.8.8.8,4,0,4,0,N/A,2,N/A

Replace timestamp to date first column

@magikcypress
magikcypress / gist:88c9640e03e583fe1a8dac110112c19e
Created March 4, 2021 15:18
Assigment user & role to Space QSEoS
# Define your tenant url
tenant="$(cat ../secret/tenant)";
# Define your API key
apiKey="$(cat ../secret/api-key)";
# Define your space
space="$(cat ../secret/space)";
# Define Url Space
urlSpace="https://$tenant/api/v1/spaces";
# Get space Id