This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def get_extension(filename): | |
regex = re.compile(r'^.*?[.](?P<ext>tar\.gz|tar\.bz2|\w+)$') | |
return regex.match(filename).group('ext') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def get_extension(filename): | |
regex = re.compile(r'^.*?.(?P<ext>.tar\.gz|.tar\.bz2|.\w+)$') | |
return regex.match(filename).group('ext') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def get_extension(filename): | |
regex = re.compile(r'^.*?.(?P<ext>.tar\.gz|.tar\.bz2|.\w+)$') | |
return regex.match(filename).group('ext') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Some date handling util functions I coded for Python/Django. | |
""" | |
import calendar | |
from datetime import datetime | |
from decimal import Decimal | |
from django.utils.datastructures import SortedDict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
santex@santex-VirtualBox:~/DevIT/nagios_samanage$ cat nagios.cfg | |
# 'notify-host-by-sam' command definition | |
define command{ | |
command_name notify-host-by-sam | |
command_line <perl path> <script path>/sam_createcase --hostname=$HOSTNAME$ --type="$NOTIFICATIONTYPE$" --state=$HOSTSTATE$ --address=$HOSTADDRESS$ --output="$HOSTOUTPUT$" --date="$LONGDATETIME$" | |
} | |
# 'notify-service-by-sam' command definition | |
define command{ | |
command_name notify-service-by-sam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Car() { | |
} | |
Car.protoype = { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ######################################################################### | |
# This bash script adds tab-completion feature to django-admin.py and | |
# manage.py. | |
# | |
# Testing it out without installing | |
# ================================= | |
# | |
# To test out the completion without "installing" this, just run this file | |
# directly, like so: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python projects: | |
alias limpiarpycs='find . -iname "*.pyc" -delete' | |
# Para que SVN no muera por los acentos: | |
export LC_CTYPE=UTF-8 | |
# General stuff: | |
alias ls="ls -G" | |
export EDITOR=nano |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Your Full Name | |
email = youremail@somemail.com | |
[alias] | |
conflicts = diff --name-only --diff-filter=U | |
st = status -s | |
ci = commit | |
br = branch | |
co = checkout |
OlderNewer