This file contains hidden or 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
for f in `ls *.JPG`; do mv $f ${f%JPG}jpg; done; | |
#Using Parameter Expansion ${f%...} see http://mywiki.wooledge.org/BashFAQ/073 |
This file contains hidden or 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 recount(){ | |
c = 0; | |
fieldset = $('form > fieldset '); | |
$.each( fieldset.children('fieldset'), function(){ | |
$.each( $(this).children('[name]'), function(){ | |
name = $(this).attr('name'); | |
newname = name.replace(/\[\d+\]/g, '['+$c+']'); | |
$(this).attr('name',newname); | |
console.log('name '+name+' -> '+newname); | |
}); |
This file contains hidden or 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 | |
namespace Application; | |
// se omiten los primeros use | |
use Zend\Log\Writer\FirePhp, | |
Zend\Log\Writer\FirePhp\FirePhpBridge, | |
Zend\Log\Writer\Stream, | |
Zend\Log\Logger; | |
class Module |
This file contains hidden or 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 | |
namespace MiModulo\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\ViewModel; | |
class MyController extends AbstractActionController | |
{ | |
public function indexAction() | |
{ |
This file contains hidden or 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
<html> | |
<head> | |
<script> | |
Element.prototype.html = function (value){ | |
if (value){ | |
this.innerHTML=value; | |
} | |
else { | |
return this.innerHTML; | |
} |
This file contains hidden or 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
# Script que lee y almacena las estadísticas de béisbol (pitcheo y bateo) de la página de la LVBP | |
# William Yanez - @wryanez | |
# Actualizado a Enero 2013 | |
# Publicado y distribuido libremente bajo licencia GPL | |
require 'nokogiri' | |
require 'net/http' | |
require 'date' | |
# Columnas de cada estadistica bateo y pitcheo |
This file contains hidden or 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
#Actualizacion de Iceweasel en Debian Squeeze | |
# | |
echo "deb http://backports.debian.org/debian-backports squeeze-backports main">/etc/apt/sources.list | |
echo "deb http://mozilla.debian.net/ squeeze-backports iceweasel-release">/etc/apt/sources.list | |
wget -O- -q http://mozilla.debian.net/archive.asc | gpg --import | |
gpg --export -a 06C4AE2A | sudo apt-key add - | |
aptitude update |
This file contains hidden or 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
-- Luego mis busquedas por numero de documento seran como esto: | |
SELECT * FROM sas.viw_auditoria_num | |
WHERE numero_doc='26' |
This file contains hidden or 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 | |
# Script para respaldo de las VM con VirtualBox | |
# William Yanez - 07/2012 | |
VM_RUNNING=$(VBoxManage list runningvms | wc -l) | |
if [ $VM_RUNNING -gt 0 ]; then | |
echo "Error: Hay $VM_RUNNING VM's Activas" | |
VBoxManage list runningvms | |
exit |
This file contains hidden or 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
#Instalacion de Servidor LAMP en Debian/Ubuntu | |
#William Yanez ([email protected]) @wryanez | |
aptitude install -y apache2 apache2-doc | |
aptitude install -y php5 php5-cli php5-common php5-dev php5-mysql | |
aptitude install -y mysql-server | |
#Habilitar soporte para postgres y sqlite3 | |
#aptitude install -y php5-pgsql php5-sqlite3 |