Skip to content

Instantly share code, notes, and snippets.

@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
@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: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);
#!/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;
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@magikcypress
magikcypress / phpcs.xml
Last active January 23, 2017 21:01
Coding rules for SPIP with Sublime text
<?xml version="1.0"?>
<ruleset name="SPIP">
<!--
Liens utiles
documentation : http://contrib.spip.net/style-code-php
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
https://github.com/ucfcdl/fuelphp-phpcs/tree/master/Standards/FuelPHP
https://github.com/vanilla/addons/tree/master/standards/Vanilla
-->
@magikcypress
magikcypress / gist:f0b9ff570921e887f8e5
Last active February 17, 2016 19:11
Créer un certificat SSL Let's encrypt

Créer un certificat SSL Let's encrypt

Ce petit article va nous permet de comprendre comment créer un certificat SSL pour apache en utilisant les certificats de let's encrypt. Attention à l'heure ou j'écris cet article, il n'est pas recommandé d'utiliser les certificats sur un serveur de production. Si vous avez des certificats auto-signé, vous pouvez toujours les remplacer par ceux de LE.

Nous allons commencer par télécharger un petit outil qui va nous permettre de créer notre certificat, cette outil est plus simple que le client proposé par Let's Encrypt. Personnellement, je le trouve un peu lourd avec ses plugins. ACME est un petit outil de 200 lignes, facile a auditer si besoin

 $ cd /usr/local/src/
 $ git clone https://github.com/diafygi/acme-tiny.git

Voilà ACME est sur notre serveur, nous allons créer un répertoire letencrypt sur notre serveur pour stocker nos clef, certificats, chaine, etc ...

@magikcypress
magikcypress / keybase.md
Created April 29, 2015 16:23
keybase.md

Keybase proof

I hereby claim:

  • I am magikcypress on github.
  • I am cypress (https://keybase.io/cypress) on keybase.
  • I have a public key whose fingerprint is 3EC1 B8D1 0C32 1C77 B561 EDEA 62EC 696C 1BE4 B407

To claim this, I am signing this object:

@magikcypress
magikcypress / gist:4761526
Last active September 1, 2018 06:09
Liste des Framework CSS

Petite liste non exhaustive des Framework CSS bien pratique pour gagner du temps dans l'intégration de son site web.

unsemantic

Successor to 960.gs

Unsemantic is a fluid grid system that is the successor to the 960 Grid System. It works in a similar way, but instead of being a set number of columns, it's entirely based on percentages.

http://unsemantic.com/

# Ce qu'il ne faut pas faire
- Mettre un élément sur la droite de l'écran
- Ne pas repenser l'agencement des informations avant de commencer (rappeler que certains ont le droit de mort sur les autres)
# Ce qu'il faut faire
## Break Points
- De 0 à 500px — Mobiles (la plupart sont situé entre 320 et 480px)