Skip to content

Instantly share code, notes, and snippets.

View javiergarval's full-sized avatar

Javier García Valdepeñas javiergarval

View GitHub Profile
@javiergarval
javiergarval / pre-commit
Created April 20, 2021 15:45 — forked from arnobroekhof/pre-commit
Maven pre commit hook
#!/bin/bash
# save the file as <git_directory>/.git/hooks/pre-commit
echo "Running Maven clean test for errors"
# retrieving current working directory
CWD=`pwd`
MAIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# go to main project dir
cd $MAIN_DIR/../../
@javiergarval
javiergarval / cx_oracle.md
Created March 11, 2019 16:54 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@javiergarval
javiergarval / bobp-python.md
Created March 6, 2019 17:30 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@javiergarval
javiergarval / .zshrc
Created February 1, 2019 11:42 — forked from dnmiller/.zshrc
zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Pre-loaded theme
ZSH_THEME="agnoster"
# (Will change per machine)
DEFAULT_USER="danmiller"
# Dots are pretty.
@javiergarval
javiergarval / SliceCounter.py
Last active June 4, 2018 10:46
Tuenti Challenge 7 | Challenge 1 - Pizza love
# Tuenti Challenge 2017 | Challenge 1 - Pizza love
# https://contest.tuenti.net/resources/2017/Question_1.html
import math
class SliceCounter:
def open_input_file(self, input_path):
@javiergarval
javiergarval / map.geojson
Last active July 27, 2016 17:05
Adding some NGO's interesting points to a map using GeoJson.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.