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
#!/bin/bash | |
# You must accept the Oracle Binary Code License | |
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html | |
# usage: get_jdk.sh <jdk_version> <ext> | |
# jdk_version: 8(default) or 9 | |
# ext: rpm or tar.gz | |
jdk_version=${1:-8} | |
ext=${2:-rpm} |
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
" Set marker as fold method | |
" vim:fdm=marker | |
" Prepare Vundle {{{ | |
set nocompatible " be iMproved | |
filetype off " must be off before Vundle has run | |
" Bootstrap Vundle, as seen in krisleech/turbo-vim | |
if !isdirectory(expand("~/.vim/bundle/Vundle.vim/.git")) | |
!git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim |
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
// Prototype demonstration | |
function Salutator(name) { | |
if (name === undefined){ | |
throw "Please specify a name for Salutator"; | |
} else { | |
this.name = name; | |
} | |
} |
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
# Fuente | |
# https://es.wikibooks.org/wiki/Algoritmo_para_obtener_la_letra_del_NIF#Python | |
def get_nif_letter(nif_numbers): | |
try: | |
return ("T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E")[nif_numbers%23] | |
except TypeError as e: | |
print(e) | |
print('Maybe you should pass the argument as a number') | |
raise |
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 os | |
import logging_manager # Fix this | |
# Get script file name without extension | |
SCRIPT_FILE_NAME=os.path.splitext(os.path.basename(__file__))[0] | |
#TODO: dot log is only added if used init_logger. | |
# Define the log filename | |
ROTATING_LOG_FILE_NAME = SCRIPT_FILE_NAME + '.log' | |
#Define the warning log filename | |
WARNING_LOG_FILE_NAME = SCRIPT_FILE_NAME + '_warning' + '.log' |
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 http.client | |
import ssl | |
root_url='jira.ci.gsnet.corp' | |
children_url='secure/Dashboard.jspa' | |
protocol=ssl.PROTOCOL_TLSv1 | |
context=ssl.SSLContext(protocol) | |
context.verify_mode=ssl.CERT_NONE | |
conn = http.client.HTTPSConnection(root_url, context=context) |
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
""" | |
Parser for amazon appliances data | |
""" | |
#TODO: Remove trailing '\n' in entries | |
import pprint | |
import sys | |
FILE_NAME='maestroparseador.txt' |
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
# | |
# .zshrc is sourced in interactive shells. | |
# It should contain commands to set up aliases, | |
# functions, options, key bindings, etc. | |
# | |
autoload -U compinit | |
compinit | |
#allow tab completion in the middle of a word |
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
" Set folding method to be marker for this file | |
" vim:fdm=marker | |
" Vundle {{{ | |
" Prepare to install Vundle if needed | |
let vundle_installed=1 " Assume Vundle is not to be installed | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
echo "Installing Vundle.." | |
echo "" |
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
RCol='\e[0m' # Text Reset | |
# Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds | |
Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m'; | |
Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m'; | |
Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m'; | |
Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m'; | |
Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m'; | |
Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m'; | |
C |
NewerOlder