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
$(document).ready(function() { | |
//Ocultar 'form_user' por defecto | |
$('#form_user').hide(); | |
//Cuando se de click a 'agregar' se muestra 'form_user' | |
$('#agregar').click(function(event) { | |
event.preventDefault(); | |
$('#form_user').show(); | |
}); |
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
<?php | |
/* Parse a SQL row array to XML document | |
Usage Example: | |
... | |
$row = mysql_fetch_array($result); | |
$xml = sql_array_to_xml($row, "contacto"); | |
header('Content-Type: text/xml') | |
echo $xml; | |
*/ |
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
!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>Instant Lookup</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
var offset = -1; | |
$(document).ready(function() { |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>Instant Lookup</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
var offset = -1; | |
$(document).ready(function() { |
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
((1..20).to_a+[6]*4).each{ |i| puts ('#'*i*2).center(80)};puts;puts 'Merry Christmas'.center(80) |
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
def quickSort(list: List[Int]): List[Int] = list match { | |
case x::xs => quickSort(xs.filter(_ < x)) ::: x :: quickSort(xs.filter(_ >= x)) | |
case Nil => Nil | |
} |
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
def quicksort(list) | |
return (list.empty?) ? [] : quicksort(list[1..list.length].find_all{|i| i < list[0]}) + [list[0]] + quicksort(list[1..list.length].find_all{|i| i >= list[0]}) | |
end |
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
#!/usr/bin/env ruby | |
f = File.open(ARGV[0], "r") | |
lines = f.readlines | |
n = lines.delete_at(0) | |
lines.each { |line| | |
words = line.split(" ") | |
words.delete_at(0) | |
puts words.sort.join("") |
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
def a;10.times{puts " "*rand(79)+"*"};end;99.times{a;puts " "*34+"Happy New Year 2011";a;sleep 0.1;puts "\e[2J"} |
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
function bash_git_branch | |
{ | |
git branch 2> /dev/null | grep \* | awk '{print "[" $2 "]"}' | |
} | |
export PS1='\w\e[0;32m$(bash_git_branch)\e[m % ' |