Skip to content

Instantly share code, notes, and snippets.

Matías Herranz matiasherranz

Block or report user

Report or block matiasherranz

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
View forms.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth import password_validation
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from accounts.models import User
class CustomUserCreationForm(UserCreationForm):
View build step node
# Let's move to the proper GIT branch
git checkout $BRANCH
git pull origin $BRANCH
# Let's go to the correct folder
cd converter
# Install the dependencies
npm install
View build step
# Let's move to the proper GIT branch
git checkout $BRANCH
git pull origin $BRANCH
# Activate the virtualenv of this job
. venv/bin/activate
# Install project requirements
pip install -Ur requirements.txt
View profile.json
{
"Working Directory" : "\/Users\/matiasherranz",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0.8470588,
"Blue Component" : 0.4784314,
"Red Component" : 0.7607843
},
"Rows" : 25,
"Ansi 11 Color" : {
View playing with js.js
function Car() {
}
Car.protoype = {
}
View nagios.cfg
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
@matiasherranz
matiasherranz / gist:9a4f2a2cb2d03aced6a4
Created Sep 26, 2014
Get filename extension function, using a regex. Keep the point.
View gist:9a4f2a2cb2d03aced6a4
import re
def get_extension(filename):
regex = re.compile(r'^.*?.(?P<ext>.tar\.gz|.tar\.bz2|.\w+)$')
return regex.match(filename).group('ext')
@matiasherranz
matiasherranz / get_extension2
Created Sep 26, 2014
Get filename extension function, using a regex. Keep the point.
View get_extension2
import re
def get_extension(filename):
regex = re.compile(r'^.*?.(?P<ext>.tar\.gz|.tar\.bz2|.\w+)$')
return regex.match(filename).group('ext')
@matiasherranz
matiasherranz / get_extension.py
Created Sep 26, 2014
Get filename extension function, using a regex.
View get_extension.py
import re
def get_extension(filename):
regex = re.compile(r'^.*?[.](?P<ext>tar\.gz|tar\.bz2|\w+)$')
return regex.match(filename).group('ext')
You can’t perform that action at this time.