Skip to content

Instantly share code, notes, and snippets.

View javierwilson's full-sized avatar

javier wilson javierwilson

  • Managua, Nicaragua
View GitHub Profile
@javierwilson
javierwilson / .gitignore
Last active August 29, 2015 13:56
.gitignore para python (django/flask)
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.rej
*.swo
*.swp
*.vi
*~
*.pyc
@javierwilson
javierwilson / do_stuff.sh
Last active August 29, 2015 13:56
hace algo con archivos que parten un nombre base
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 imagefile-42"
exit
fi
pages=4
file=$1
@javierwilson
javierwilson / .zshrc
Last active August 29, 2015 13:56
my .zshrc
#
# my .zshrc, based on https://github.com/topfunky/zsh-simple
#
#if [ -f /etc/zshrc ]; then
# . /etc/zshrc
#fi
# History
HISTFILE=~/.histfile
@javierwilson
javierwilson / piwik.spec
Last active August 29, 2015 13:57
spec file for piwik
%define contentdir /var/www
Name: piwik
Version: 2.1.0
Release: 1%{?dist}
Summary: Open Analytics Platform
License: GPLv3
URL: http://piwik.org/
Source0: http://builds.piwik.org/latest.zip
@javierwilson
javierwilson / awffull.spec
Created March 26, 2014 18:25
spec file for awffull
# $Id: awffull.spec 4076 2006-03-30 $
# Authority: dries + javier wilson
# Upstream: Javier Wilson <javier$guegue,com>
Summary: Web server log analysis program
Name: awffull
Version: 3.10.2
Release: 1%{?dist}
License: GPL
Group: Applications/Internet
@javierwilson
javierwilson / access_points.tpl
Last active September 8, 2015 04:26
Generates Nagios config for Access Points
define hostgroup{
hostgroup_name access_points
alias Access Points
}
{%- for ap in items %}
define host{
use generic-switch
host_name {{ ap.name }}
alias {{ ap.name }}
@javierwilson
javierwilson / mailq-purge.sh
Created May 3, 2014 17:18
Delete mail in queue from: or to: specific e-mail address
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 [email protected]"
exit
fi
rcpt=$1
QIDS=`mailq | grep -B1 "$rcpt" | grep '^[a-z]' | awk '{print $1}' | sed 's/\*$//'`
for q in $QIDS
@javierwilson
javierwilson / sendsms.php
Created May 23, 2014 23:20
Send Bulk SMS using Twilio
<?php
require('Services/Twilio.php');
$sid = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$from = "5555555555";
require('config.php');
#+555555555555,Alice Smith,CT
#+555555555555,Bob Rodriguez,LTO 01A
@javierwilson
javierwilson / access_points.cfg
Created June 7, 2014 11:57
Generates and upload Nagios config for Access Points
define hostgroup{
hostgroup_name access_points
alias Access Points
}
{%- for ap in items %}
define host{
use generic-switch
host_name {{ ap.name }}
alias {{ ap.name }}
@javierwilson
javierwilson / pulse.spec
Created November 14, 2014 02:14
spec file for pulse
%define debug_package %{nil}
Name: pulse
Version: 0.10.5
Release: 1%{?dist}
Summary: Open Source Continuous File Synchronization
Group: Applications/Internet
License: GPLv3
URL: https://ind.ie/pulse/