Skip to content

Instantly share code, notes, and snippets.

@gjuric
gjuric / gist:e0c9e45efb3d15e3b949
Created December 11, 2014 14:13
PHP-FPM log to syslog
/etc/php5/fpm/php-fpm.conf
error_log = syslog
syslog.ident = php-fpm
This will log to syslog PHP-FPM stuff that usually gets logged to /var/log/php5-fpm.log and is not that interesting:
... php-fpm[3537]: [NOTICE] fpm is running, pid 3537
... php-fpm[3537]: [NOTICE] ready to handle connections
... php-fpm[3537]: [NOTICE] Finishing ...
@halberom
halberom / output
Created August 3, 2015 11:26
ansible - example of using from_json
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [shell cat '/tmp/file.json'] ********************************************
changed: [localhost]
TASK: [debug var=result] ******************************************************
ok: [localhost] => {
@tianweiliu
tianweiliu / pysyslog.py
Last active October 26, 2021 15:08 — forked from marcelom/pysyslog.py
Tiny Python Syslog Server
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'yourlogfile.log'
#!/usr/bin/env node
###########################################################################################
# Dynamic inventory for Ansible with DNS
# Author Remie Bolte (https://nl.linkedin.com/in/remiebolte)
#
# This NodeJS script generates a dynamic inventory based on DNS TXT records.
#
# If you use the “--inventory” switch when calling Ansible, you can provide the
# path to a directory which includes inventory files. Ansible will automtically
@ArVan
ArVan / app.js
Last active March 11, 2021 03:06
JWT Authentication with Passport
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var index = require('./routes/index');
var user = require('./routes/user');
var auth = require('./routes/auth');