Skip to content

Instantly share code, notes, and snippets.

View MickaelBergem's full-sized avatar
🚀

Mickaël MickaelBergem

🚀
View GitHub Profile
@MickaelBergem
MickaelBergem / enerfip_to_calendar.py
Created December 27, 2023 22:11
Generate a calendar with all future payments from Enerfip (crowdfunding for renewable energy projects)
"""
Go to https://fr.enerfip.eu/app/accounts/, click "Mon échéancier", then at the bottom of the page click "Exporter au format XLS".
"""
import os
from datetime import datetime
import xlrd
from ics import Calendar, Event
path_to_downloaded_xls_file = os.path.expanduser('~') + '/Downloads/transactions.xls'
@MickaelBergem
MickaelBergem / install-vuejs-doc.sh
Created April 20, 2019 03:13
Download and build the Vue.JS documentation for offline access
# Clone the repository
git clone https://github.com/vuejs/vuejs.org.git
cd vuejs.org
# Install the JS dependencies
yarn
# Start the server
yarn start
# The server should now be running on http://localhost:4000/
@MickaelBergem
MickaelBergem / .project-sentryclirc
Created July 11, 2018 11:33
Example project-specific .sentryclirc file
[defaults]
org=howfast
project=frontend
@MickaelBergem
MickaelBergem / .home-sentryclirc
Created July 11, 2018 11:30
Example ~/.sentryclirc file
[auth] 
token = deadbeef
@MickaelBergem
MickaelBergem / config.js
Created July 11, 2018 11:08
Project onfiguration file
/* eslint-env node */
// ...
// We store the release ID in a VUE_APP_SENTRY_RELEASE environment variable
export const SENTRY_RELEASE = process.env.VUE_APP_SENTRY_RELEASE;
// ...
export default {
@MickaelBergem
MickaelBergem / main.js
Last active July 11, 2018 11:10
Register Sentry in a Vue.js project
/* eslint-env node */
import Vue from 'vue';
// You should not have to import anything special before Raven
// Import Raven, Sentry's SDK
import Raven from 'raven-js';
import RavenVue from 'raven-js/plugins/vue';
// Import our local "config.js" file
@MickaelBergem
MickaelBergem / poc-security-influx-go-client.go
Created June 12, 2018 22:12
PoC for command injection in the InfluxDB Go client
package main
import (
"log"
"time"
client "github.com/influxdata/influxdb/client/v2"
)
const database = "poc"
@MickaelBergem
MickaelBergem / celery_poc.py
Created December 1, 2017 19:04
PoC about a retry bug on Celery
from celery import Celery
class config(object):
CELERY_BROKER_CONNECTION_TIMEOUT = 1 # 1s
CELERY_BROKER_CONNECTION_MAX_RETRIES = 0
CELERY_BROKER_CONNECTION_RETRY = False
CELERY_TASK_PUBLISH_RETRY = False
CELERY_TASK_PUBLISH_RETRY_POLICY = {
'max_retries': 0,
@MickaelBergem
MickaelBergem / timelapse-pi.py
Created February 21, 2016 12:36
Quick'n dirty script to capture images for a timelapse
#!/usr/bin/python3
import os
import time
from datetime import datetime
while(True):
os.system("/usr/bin/raspistill -o 'timelapse-{}.jpg'".format(datetime.now().isoformat()))
time.sleep(15)
@MickaelBergem
MickaelBergem / owncloud-docker-compose.yml
Last active August 22, 2021 23:41
Docker Compose file for setting up an ownCloud server using a PostgreSQL database
# Composition of the containers
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db