Skip to content

Instantly share code, notes, and snippets.

View thomasleveil's full-sized avatar

Thomas LÉVEIL thomasleveil

  • MV Group
  • Rennes, France
View GitHub Profile
@thomasleveil
thomasleveil / XlsToCsv.vbs
Created July 25, 2018 09:45
VBS script to convert an excel file to csv
if WScript.Arguments.Count < 1 Then
WScript.Echo "Please specify the source files. Usage: ExcelToCsv <xls/xlsx source file>"
Wscript.Quit
End If
csv_format = 6
Set objFSO = CreateObject("Scripting.FileSystemObject")
src_file = objFSO.GetAbsolutePathName(Wscript.Arguments.Item(0))
@thomasleveil
thomasleveil / templates.json
Last active March 31, 2018 01:52
Portainer templates
[{
"type": "container",
"title": "Træfik",
"description": "Træfik (pronounced like traffic) is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease. It supports several backends (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, and a lot more) to manage its configuration automatically and dynamically.",
"note": "<a href=\"http://docs.traefik.io/\">Træfik documentation</a>",
"platform": "linux",
"categories": ["webserver", "reverse proxy"],
"logo": "https://docs.traefik.io/img/traefik.logo.png",
"image": "traefik:latest",
"command": "--web --docker --docker.domain=docker.localhost --logLevel=DEBUG --docker.exposedByDefault=true",
@thomasleveil
thomasleveil / docker-compose.override.yml
Created October 3, 2017 20:41
docker override smtp
version: "2.1"
services:
smtp:
image: mailhog/mailhog
command: ["-smtp-bind-addr", "0.0.0.0:25"]
user: root
expose:
- 25
- 8025
@thomasleveil
thomasleveil / README.md
Last active August 4, 2019 17:10
workaround BIOS / NVidia backlight issues

From https://wiki.archlinux.org/index.php/backlight#sysfs_modified_but_no_brightness_change

Works for Laptop msi GT72VR 6RD Dominator

sysfs modified but no brightness change

Note: This behavior and their workarounds have been confirmed on the Dell M6700 with Nvidia K5000m (BIOS version prior to A10) and Clevo P750ZM (Eurocom P5 Pro Extreme) with Nvidia 980m.

On some systems, the brighness hotkeys on your keyboard correctly modify the values of the acpi interface in /sys/class/backlight/acpi_video0/actual_brightness but the brightness of the screen is not changed. Brigthness applets from desktop environments may also show changes to no effect.

@thomasleveil
thomasleveil / README.md
Created January 10, 2017 00:16
Test Certification Authority

create_server_certificate.sh

create_server_certificate.sh is a script helping with issuing server certificates that can be used to provide TLS on test web servers.

It also creates a Certificate Authority (CA) root key and certificate. This CA root certificate can be used to validate the server certificates it generates.

The intent is to easily produce a CA root certificate and issue server certificate for test purpose.

For instance, with curl:

@thomasleveil
thomasleveil / README.md
Last active March 15, 2016 15:04
Android Gradle auto version

Android projet auto-version update

This gradle snippet setup auto management of versionCode and versionName using tags found on your git repository.

  • When building an apk from a commit tagged v1.4.2, then versionName will be v1.4.2
  • When building an apk from a commit abcd123 which is the 3rd one after tag v1.5.7, then versionName will be v1.5.7-3-gabcd123
  • versionCode is automatically handled given versionName value
@thomasleveil
thomasleveil / Dockerfile
Last active May 25, 2017 15:42
Docker Cloud9 with Golang
FROM kdelfour/cloud9-docker
ENV GO_VERSION 1.6
RUN curl -sL https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz \
| tar xz -C /usr/local/
RUN apt-get update \
&& apt-get install -y bash-completion
FROM nginx:1.9.9
MAINTAINER Jason Wilder [email protected]
# Install wget and install/updates certificates
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
ca-certificates \
wget \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
Verifying that +thomasleveil is my blockchain ID. https://onename.com/thomasleveil
FROM busybox
ENV PATH /foo
CMD /bin/echo "PATH: $PATH"