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
require 'rubygems' | |
require 'net/http' | |
url = URI.parse('http://laurel.datsi.fi.upm.es/index.php') | |
req = Net::HTTP::Get.new(url.path) | |
req.add_field 'Range', 'bytes=714-732' | |
res = Net::HTTP.start(url.host, url.port) {|http| |
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
// plugin para indicador de cargando | |
$.fn.showLoading = function(top, left) { | |
top = top || 0; | |
left = left || 0; | |
this.each(function() { | |
// crear indicador | |
var $this = $(this); | |
var offset = $this.offset(); | |
offset.top += top; | |
offset.left += $this.width() + left; |
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
# Ruby, Generacion de minuaturas usando Image Magick | |
i = 0 | |
full = "1200x900" | |
thumb = "320x240" | |
images = Dir.entries(".") | |
images.each do |file| | |
if file.match(/\.jpg$/i) |
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
<%= make_breadcrumb(yield :breadcrumb) %> |
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
/*! split_in_span v1 | flasheves.com */ | |
jQuery.fn.extend({ | |
split_in_span: function(){ | |
var arr = jQuery(this).text().split(' '); | |
var tamo = arr.length; | |
for(i=0;i<tamo;i++){ arr[i] = '<span>' + arr[i] + '</span>'; } | |
jQuery(this).html(arr.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
require 'rubygems' | |
require 'net/http' | |
require 'uri' | |
BIT_RATE = 48 #6kbxseg * 60 seg (a min) * 15min | |
TAMO_CORTE = (BIT_RATE/8) * 60 * 15 #en KB | |
url = URI.parse('http://186.1.15.253:8000/') | |
Net::HTTP.start(url.host, url.port) do |http| |
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
#!/bin/sh | |
TEMP_DIR="/tmp/jsmin" | |
SRC_FILENAME="http://www.crockford.com/javascript/jsmin.c" | |
SRC_BASENAME="jsmin.c" | |
BIN_BASENAME="jsmin" | |
BIN_DIR="/bin" | |
mkdir $TEMP_DIR | |
cd $TEMP_DIR |
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 | |
/** | |
* Widget Post: Marca Labs - LineaCat | |
* MLWidgetLineaCat Class | |
*/ | |
class MLWidgetLineaCat extends WP_Widget { | |
function MLWidgetLineaCat() { | |
parent::WP_Widget(false, $name = 'ML Widget Cat', array('description' =>__( 'Muestra post y subcategorias de una categoria padre',''))); | |
} |
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
<h1><?php the_title() ?></h1> | |
<?php | |
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); | |
if ( $images ) : | |
?> | |
<?php foreach($images as $ima): ?> | |
<div class="gallery-thumb ev-gallery"> | |
<a rel="ev-gallery" class="size-thumbnail" href="<?php echo wp_get_attachment_url($ima->ID); ?>"><?php echo wp_get_attachment_image( $ima->ID, 'thumbnail' ); ?></a> |
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
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 |
OlderNewer