Skip to content

Instantly share code, notes, and snippets.

Avatar

Pablo Banderas pbanderas

View GitHub Profile
@pbanderas
pbanderas / gitrc
Last active Mar 11, 2020 — forked from philcryer/gitrc
This .gitrc activates when you're in a directory that is a git repo. It tells you the branch you're on, with color handling of the bash prompt according to the branch/status. For example, the prompt would look like this: [~/foo](master) $ with (master) colored GREEN, until you've added a file to the repo, but not committed it, then it will turn …
View gitrc
#!/bin/bash
#
# Set your bash prompt according to the branch/status of the current git repository.
# Relies on git output being in English.
# Set an alias with
# $ echo "alias git='LANGUAGE=en_US.UTF-8 git'" >> ~/.bash_profile
#
# Forked from https://gist.github.com/philcryer/5066010
#
RED="\[\033[0;31m\]"
@pbanderas
pbanderas / install-orc-tools.sh
Last active Oct 17, 2019 — forked from eidosam/install-orc-tools.sh
Install Apache ORC tools
View install-orc-tools.sh
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get purge cmake cmake-data
sudo apt-get -y install build-essential cmake
curl -sSLO http://www.mirrorservice.org/sites/ftp.apache.org/orc/orc-1.4.1/orc-1.4.1.tar.gz
tar -zxf orc-1.4.1.tar.gz
cd orc-1.4.1
mkdir build
cd build
@pbanderas
pbanderas / cheatsheet-git.sh
Last active Mar 4, 2019 — forked from raineorshine/cheatsheet-git.sh
Cheatsheet: git commands
View cheatsheet-git.sh
# adding and committing
git add -A # stages All
git add . # stages new and modified, without deleted
git add -u # stages modified and deleted, without new
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed.
git commit --amend --no-edit # Do so without having to edit the commit message.
# remotes - pushing, pulling, and tracking
git fetch # gets remote objects and refs. Needed if new branches were added on the remote.
git remote -v # Lists all remotes (verbose)
@pbanderas
pbanderas / aws_dynamodb_local
Last active Dec 27, 2017 — forked from Cinedin/aws_dynamodb_local
Download last Local DynamoDB and execute as daemon
View aws_dynamodb_local
#!/bin/sh
#
# chkconfig: 35 99 01
# description: java application
#
if [ -z "$JRE_HOME" ]; then
JRE_HOME="$JAVA_HOME"
fi
if [ -z "$JRE_HOME" ]; then
@pbanderas
pbanderas / xfdf.php
Created Sep 14, 2015
HTML Form to FDF Parser for PHP
View xfdf.php
<?php
/*
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto
Version 1.2
Last Modified: 2011/12/02
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
@pbanderas
pbanderas / vagrant-private-ip.md
Last active Aug 29, 2015
Vagrant error with private network IP
View vagrant-private-ip.md

Occurred with Centos 6.4 installations.

After specifying a private IP address in Vagrant file, command vagrant up crashed with this error

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifdown eth1 2> /dev/null
You can’t perform that action at this time.