Skip to content

Instantly share code, notes, and snippets.

View TOTOleHero's full-sized avatar

Thomas Lecarpentier TOTOleHero

View GitHub Profile
@TOTOleHero
TOTOleHero / supervisord.service
Last active May 23, 2017 13:11 — forked from mozillazg/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
@TOTOleHero
TOTOleHero / InstallSuperisorInRedhat.md
Last active May 5, 2017 15:29 — forked from arielmagbanua/InstallSupervisorInRedhat.md
Supervisor Installation Guide for CentOS/RHEL/Fedora

#Installing Supervisor As the super user, firstly install the Python setup tools to gain EasyInstall3, then use that to install Supervisor:

$ yum install python-setuptools
$ easy_install supervisor

#You should now have the latest version installed:

$ supervisord --version
apt-get install wkhtmltopdf
apt-get install xvfb
echo -e '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf -q $*' > /usr/bin/wkhtmltopdf.sh
chmod a+x /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
wkhtmltopdf http://www.google.com output.pdf
@TOTOleHero
TOTOleHero / README.md
Created June 13, 2017 17:04
wkhtmltopdf centos 7 headless with xvfb

wkhtmltopdf centos 7 headless with xvfb

Install and run standalone Xvfb

yum install xorg-x11-server-Xvfb
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
rpm -ivh wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
URL="http://stackoverflow.com/"
# store the whole response with the status at the and
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL)
# extract the body
HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')
# extract the status
HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
@TOTOleHero
TOTOleHero / monolog.yml
Created March 30, 2018 11:54 — forked from raystorm/monolog.yml
Symfony log to stdout & stderr
stdout:
type: stream
path: "php://stdout"
level: debug
stderr:
type: stream
path: "php://stderr"
level: warning
@TOTOleHero
TOTOleHero / docker-cleanup-resources.md
Created December 6, 2018 16:29 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

Go to : https://developer.amazon.com/fr/docs/alexa-voice-service/set-up-raspberry-pi.html
Il faut passer en Strecht
But to install you need to install manualy libssl-dev
wget http://security-cdn.debian.org/debian-security/pool/updates/main/o/openssl/libssl-dev_1.0.1t-1+deb8u10_armhf.deb
wget http://security-cdn.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u10_armhf.deb
sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u10_armhf.deb libssl-dev_1.0.1t-1+deb8u10_armhf.deb
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": "coordinates": [
[
4.839134216308594,
45.750875776475254
],
[
@TOTOleHero
TOTOleHero / nginx_google_analytics
Last active April 23, 2020 07:25 — forked from srstsavage/nginx_google_analytics
google analytics in nginx
# send logs for all traffic (including non-html) to google analytics
#
# in server block:
# set $google_analytics_id "UA-THECORRECT-ID";
# include /srv/nginx/google_analytics;
#
# in location blocks:
# post_action @ga;
#
# notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day.