Skip to content

Instantly share code, notes, and snippets.

Paolo T. pixline

  • /usr/local/bin/zsh
Block or report user

Report or block pixline

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pixline
pixline / ftp.json
Last active May 5, 2017
lnav.org FTP log format (work in progress).
View ftp.json
{
"ftp_log" : {
"title" : "FTP XFER log format",
"description" : "The default FTP/XFERLOG server log.",
"url" : "http://www.proftpd.org/docs/howto/Logging.html",
"multiline" : false,
"regex" : {
"core": {
"pattern" : "^(?<timestamp>\\w{3}\\ \\w{3}\\ \\d{2}\\ \\d{2}\\:\\d{2}\\:\\d{2}\\ \\d{4})\\ (?<xfer_time>\\d{1,9})\\ (?<remote_ip>\\d{1,3}\\.\\d{1,3}.\\d{1,3}.\\d{1,3})\\ (?<file_size>\\d{1,})\\ (?<file_name>\/\\S{1,})\\ (?<xfer_type>\\w{1})\\ (?<xfer_flag>\\S{1,})\\ (?<xfer_direction>\\w{1,})\\ (?<xfer_mode>\\w{1,})\\ (?<xfer_user>\\S{1,})\\ (?<xfer_service>\\w{1,})\\ (?<xfer_auth_method>\\w{1,})\\ (?<xfer_auth_id>\\S{1,})\\ (?<xfer_status>\\w{1,})$"
}
@pixline
pixline / squid.conf
Last active Dec 28, 2015
pfsense 2.1 squid3 proxy + adblock setup
View squid.conf
# http://aacable.wordpress.com/tag/squid-maximum-cache-hit/
# https://calomel.org/squid_adservers.html
http_port 192.168.3.254:3128
http_port 10.0.0.253:3128
http_port 127.0.0.1:3128 intercept
icp_port 7
dns_v4_first off
pid_filename /var/run/squid.pid
cache_effective_user proxy
@pixline
pixline / Makefile
Last active Dec 15, 2015
Vagrant project setup Makefile
View Makefile
# Digital Ocean Vagrant Makefile
# Based on https://gist.github.com/avalanche123/1297080
# These values are overwriteable by command line.
AUTHOR = SWERgroup Developers <plugins@swergroup.com>
PROJECT = vagrant
CONFDIR = config
PROVDIR = provision
define license
@pixline
pixline / multilanguage.json
Created Feb 25, 2014
WP pods light multilanguage prototype
View multilanguage.json
{"meta":{"version":"2.3.18","build":1393355830},"pods":{"21":{"id":21,"name":"language","label":"Languages","description":"","type":"taxonomy","storage":"none","object":"","alias":"","fields":[],"show_in_menu":1,"label_singular":"Language","public":"1","show_ui":"1","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"1","query_var":"1","sort":"0","built_in_post_types_page":"1","built_in_post_types_post":"1","built_in_post_types_attachment":"0","menu_location":"default","menu_position":"0","show_in_nav_menus":"1","show_tagcloud":"1","show_admin_column":"1"},"23":{"id":23,"name":"post","label":"Post","description":"","type":"post_type","storage":"meta","object":"post","alias":"","fields":{"post_language":{"id":24,"name":"post_language","label":"Language","description":"","help":"","class":"","type":"pick","weight":0,"pick_object":"taxonomy","pick_val":"language","sister_id":"","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox",
@pixline
pixline / colorbash-escape.sh
Created Oct 23, 2013
color bash techniques
View colorbash-escape.sh
# Text color variables
txtred='\e[0;31m' # red
txtgrn='\e[0;32m' # green
txtylw='\e[0;33m' # yellow
txtblu='\e[0;34m' # blue
txtpur='\e[0;35m' # purple
txtcyn='\e[0;36m' # cyan
txtwht='\e[0;37m' # white
bldred='\e[1;31m' # red - Bold
@pixline
pixline / wheezypoint.sh
Last active Dec 25, 2015
debian7 raw internet point setup. of course it doesn't work, but it should :-) 1) debootstrap + kernel + grub 2) script 3) internet point!
View wheezypoint.sh
#!/bin/bash
# running time measure
start_seconds=`date +%s`
# network check
ping_result=`ping -c 2 8.8.8.8 2>&1`
# architecture
arch=`uname -m`
# Script URLs
GUEST_URL="https://gist.github.com/pixline/6981710/raw/5bcc702616a8253b0ed90889dd31529962a89c37/guest-account.sh"
@pixline
pixline / lightdm.conf
Created Oct 14, 2013
lightdm.conf guest support (sample)
View lightdm.conf
[LightDM]
start-default-seat=true
guest-account-script=guest-account
[SeatDefaults]
xserver-command=Xorg
xserver-allow-tcp=false
greeter-session=lightdm-greeter
greeter-hide-users=true
greeter-allow-guest=true
@pixline
pixline / guest-account.sh
Created Oct 14, 2013
/usr/sbin/guest-account script (debian version)
View guest-account.sh
#!/bin/bash
# (C) 2008 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
# License: GPL v2 or later
# modified by David D Lowe and Thomas Detoux
# Debian 7 support by pixline <pixline@gmail.com>
# It NEEDS /bin/bash, dash won't work (sed issues).
#
# Setup user and temporary home directory for guest session.
@pixline
pixline / osxlocal.sh
Last active Dec 24, 2015
homebrew local setup
View osxlocal.sh
#!/bin/bash
homebrew_packages=(
freetype
jpeg
libpng
gd
zlib
openssl
unixodbc
@pixline
pixline / .scrutinizer.yml
Created Sep 28, 2013
sample scrutinizer.yml config file for WordPress plugin
View .scrutinizer.yml
filter:
paths:
- 'lib/*'
- '/*'
excluded_paths:
- 'tests/*'
- 'examples/*'
tools:
php_mess_detector:
filter:
You can’t perform that action at this time.