Skip to content

Instantly share code, notes, and snippets.

View mqu's full-sized avatar
🏠
Working from home

Marc Quinton mqu

🏠
Working from home
  • DGAC / DSNA / DTI
  • Toulouse / France
View GitHub Profile
@mihailescu2m
mihailescu2m / solaredge.py
Created December 31, 2019 23:00
snippet to write solaredge optimisers panel data in an influxdb database
import requests, pickle
from datetime import datetime
import json, pytz
import pandas as pd
from influxdb import DataFrameClient
login_url = "https://monitoring.solaredge.com/solaredge-apigw/api/login"
panels_url = "https://monitoring.solaredge.com/solaredge-web/p/playbackData"
SOLAREDGE_USER = "" # web username
@cerisara
cerisara / courbe.md
Last active December 16, 2019 20:01
durée de vie moyenne des personnes décédées par date de naissance en France
@nuclearace
nuclearace / main.swift
Last active September 8, 2024 12:06
Lychrel numbers
// Output
// $ time ./.build/x86_64-apple-macosx/release/Runner
// Found 249 Lychrel numbers between 1...10_000 when limited to 500 iterations
// Number of Lychrel seeds found: 5
// Lychrel seeds found: [196, 879, 1997, 7059, 9999]
// Number of related Lychrel nums found: 244
// Lychrel palindromes found: [4994, 8778, 9999]
// real 0m0.300s
// user 0m0.289s
@Pierre-Gilles
Pierre-Gilles / docker-compose.yml
Created May 19, 2019 23:42
Gladys docker-compose.yml
version: '2'
services:
mariadb:
image: mariadb
container_name: gladys-mariadb
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: "gladys"
restart: always
@JohnLaTwC
JohnLaTwC / bashscript.sh
Created May 6, 2019 14:54
Bash script: 077d51016727216dd6216a3722353be274288d411a6295a5d804d251dacd88fc
#!/bin/bash
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#This is the Old-ReBuild Lady job copy
#
#Goal:
# The goal of this campaign is as follows;
# - To keep the internet safe.
# - To keep them hackers from causing real damage to organisations.
# - We know you feel We are a potential threat, well We ain't.
@deardooley
deardooley / ldap2json.sh
Created January 27, 2019 00:24
Parse output of ldapsearch to json
#!/usr/bin/env bash
# ldap2json.sh
#
# Example shell script showing how to parse LDIF output from the
# ldapsearch command into a json array. Please note that this
# script almost certainly does not handle every edge case, and
# is best used to pull a handful of fields a user or group
# record in a FreeIPA ldap server and format them as JSON for use
# in other tools.
#include <WiFi.h>
#include <WiFiUdp.h>
WiFiUDP udp;
const char * ssid = "SSID";
const char * password = "PASS";
boolean connected = false;
void setup()
{
@benfavre
benfavre / gist:9ba894134f43123eaf5ff9a6d44f302a
Created August 13, 2018 14:01
MYSQL / MARIADB error | Can't init tc log
[Note] Recovering after a crash using tc.log
[ERROR] Can't init tc log
[ERROR] Aborting
FIX:
rm /var/lib/mysql/tc.log
Then:
sudo service mysql start
@fedek6
fedek6 / .user.ini
Created July 27, 2018 12:12
Simple PHP large upload test script
upload_max_filesize = 2048M
post_max_size = 2048M
max_input_time = 3600
@samyranavela
samyranavela / Example health-check script with systemd socket activation
Created April 18, 2018 12:56 — forked from kouk/Example health-check script with systemd socket activation
Simple HTTP health-check by abusing systemd socket activation with shell scripts
$ curl --dump-header - localhost:12345
HTTP/1.0 404 Not Found
Content-Type: text/html
Content-Length: 43
Date: Fri, 05 Dec 2014 17:48:56 +0000
<html>
<body>
<h1>WUT</h1>
</html>