Skip to content

Instantly share code, notes, and snippets.

View neosergio's full-sized avatar
🤓
Happy Coding!

Sergio Infante neosergio

🤓
Happy Coding!
View GitHub Profile
git diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" > changes.patch
@neosergio
neosergio / gist:4589636
Created January 21, 2013 21:32
Just for fun in accordion functionality
//playing with collapsibles areas
$(document).ready(function(){
$("[data-toggle='collapse']").click(function(e){
var $this = $(this);
var $icon = $this.find("i[class^='icon-chevron']");
console.log('llega');
if ($icon.hasClass('icon-chevron-right')){
$icon.removeClass('icon-chevron-right').addClass('icon-chevron-down');
} else {
$icon.removeClass('icon-chevron-down').addClass('icon-chevron-right');
@neosergio
neosergio / gist:4453696
Last active December 10, 2015 15:19
Just fun
[[171108522930776]]
[[168456309878025]]
[[164413893600463]]
[[189637151067601]]
[[218595638164996]]
[[106043532814443]]
[[189637151067601]]
[[214457085240151]]
[[129627277060203]]
[[160723207280093]]
@neosergio
neosergio / js_confirmar
Created July 24, 2012 22:21
Confirmar cambios Modal windows
/* Dialogo para confirmar cambios */
$(document).ready(function(){
// Formateamos el botón Diálogo sencillo
$('#dialogSencillo').button();
// Damos formato a la Ventana de Diálogo
$('#dialogo').dialog({
// Indica si la ventana se abre de forma automática
autoOpen: false,
// Indica si la ventana es modal
modal: true,
@neosergio
neosergio / nuevo_documento.html
Created July 24, 2012 22:20
Ejemplo de plantilla Django con Javascript
{% extends 'base.html' %}
{% block titulo %}Agregar o editar nuevos trabajos {% endblock %}
{% block css %}
<link href='/static/css/south-street/jquery-ui-1.8.16.custom.css' rel='stylesheet'>
{% endblock %}
{% block javascript %}
<script src='/static/js/jquery-1.6.2.min.js'></script>
<script src='/static/js/jquery-ui-1.8.16.custom.min.js'></script>
<script src='/static/js/jquery.ui.datepicker-es.js'></script>
<script src='/static/js/legolax.js'></script>
@neosergio
neosergio / gui
Created June 14, 2012 01:42
interfaz gráfica de ejemplo de Tkinter con Python
#-*- coding:utf-8 -*-
from Tkinter import *
#funciones de procesamiento
def procesar():
resultado = peso.get() + altura.get()
print resultado
#Instancia de la clase Tk
ventana = Tk()