Skip to content

Instantly share code, notes, and snippets.

@vicendominguez
vicendominguez / nxlog.conf
Last active August 29, 2015 14:17
wowza logs to json via nxlog (first try)
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally under
## /usr/share/doc/nxlog-ce/ and is also available online at
## http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
########################################
# Global directives #
########################################
User nxlog
Group nxlog
@vicendominguez
vicendominguez / Vagranfile
Created February 26, 2015 11:15
Vagrantfile Template (Ansible)
Vagrant.configure(2) do |config|
config.vm.define "base", primary: true do |base|
base.vm.box = "chef/centos-6.6"
base.vm.network "private_network", ip: "10.1.1.10"
base.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/playbooks/n3vagrant-basepackages.yml"
ansible.sudo = true
end
end
config.vm.define "nginx" do |nginx|
@vicendominguez
vicendominguez / gist:78b1b2893d9dce40d643
Created February 18, 2015 13:11
phppgadmin as nginx alias inside a server tag
## phppgadmin config for nginx (headache)
location ~ ^/phppg {
root /path/path/www/;
location ~ ^/phppg/(.+\.php$) {
root /path/path/www/;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass php;
@vicendominguez
vicendominguez / supervisord.service
Last active May 18, 2017 17:30 — forked from tonyseek/supervisord.service
systemd service with personal path to the supervisord config
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor.d/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown
@vicendominguez
vicendominguez / netcraft-HostingHistory-scraper.js
Last active September 21, 2015 15:39
This is a scraper for the NetCraft site to get IP history of a webserver from terminal
#!/usr/bin/env casperjs
// npm -g install phantomjs
// npm -g install casperjs
// Reminder: PATH_NODE pointed to the correct node modules location please
var utils = require('utils');
var casper = require('casper').create();
@vicendominguez
vicendominguez / tail-color.sh
Last active August 29, 2015 14:13 — forked from kartikshah/tail-color.sh
tail color with "INFO" in green showing all lines
$tail -f /var/log/applications/application.log | awk '
// {print $0}
/INFO/ {print "\033[32m" $0 "\033[39m"}
'
@vicendominguez
vicendominguez / main.yml
Last active February 16, 2018 23:22
Ansible: playing with pubkeys and sync files
- name: Generating RSA key for root
user: name=root generate_ssh_key=yes
- name: Downloading pub key
fetch: src=/root/.ssh/id_rsa.pub dest=/tmp/id_rsa.tmp flat=yes
- name: Copying local key to other.server.net
local_action: shell cat /tmp/id_rsa.tmp | ssh -p 2244 root@other.server.net "cat >> /root/.ssh/authorized_keys"
- name: Deleting temporal files
@vicendominguez
vicendominguez / gflogsumm.py
Last active August 29, 2015 14:07
glassfish server.log stats
#!/usr/bin/env python
# https://vicendominguez.blogspot.com
# v0.01
import re
def main():
# VARIABLES
@vicendominguez
vicendominguez / process_mon.py
Created September 24, 2014 12:00
Fast process monitor daemon in python with logger and email notifier
#!/usr/bin/env python
import os, smtplib
from sys import exit
@vicendominguez
vicendominguez / OldLinksysMustDie.py
Created September 6, 2014 06:41
For WAG200* and WAG54* old firmware - My Old Linksys DOS PoC
#!/usr/bin/python
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of