Skip to content

Instantly share code, notes, and snippets.

View sigilioso's full-sized avatar

Christian sigilioso

View GitHub Profile
@sigilioso
sigilioso / .bashrc
Last active April 19, 2018 07:17
Custom prompt including git information
export LANGUAGE==en_US.utf8
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
source ~/.utils/git-completion.bash
# Only if docker installed
source /etc/bash_completion.d/docker
@sigilioso
sigilioso / input_help_validation.html
Created October 2, 2012 22:44
jQuery simple input help to choose a correct value.
<html>
<head>
<style>
.input_error {
color: red;
font-weight: bold;
}
#code_value_error {
color: red;
}
@sigilioso
sigilioso / cuter.py
Created June 19, 2012 22:58
Python PIL Example: get a thumbnail by resizing and cropping an image.
# -*- coding: utf-8 -*-
import Image
def resize_and_crop(img_path, modified_path, size, crop_type='top'):
"""
Resize and crop an image to fit the specified size.
args:
img_path: path for the image to resize.
@sigilioso
sigilioso / button_example.css
Created April 10, 2012 16:05
button style example
/*<input class="button" type="submit" value="test">*/
.button {
margin-top: 10px;
padding: 2px;
border: 1px solid #006699;
border-radius: 5px 5px 5px 5px;
color: #006699;
font-weight: bold;
text-align: center;