Skip to content

Instantly share code, notes, and snippets.

Gustavo Lacoste knxroot

Block or report user

Report or block knxroot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@knxroot
knxroot / websql_basico
Created Nov 11, 2012
HTML5:websql ejemplo básico
View websql_basico
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web SQL</title>
<script type="text/javascript">
function almacenar()
{
var db=openDatabase('Mibbdd','1.0','mi base de datos', 2*1024*1024);
db.transaction(function(tx)
@knxroot
knxroot / gist:4056320
Created Nov 11, 2012
HTML5:webstorage ejemplo básico
View gist:4056320
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web Storage</title>
<script type="text/javascript">
function almacenar()
{
if (typeof(Storage)!=='undefined')
{
@knxroot
knxroot / translate.sh
Created Nov 11, 2012
google translate from bash
View translate.sh
help='translate <text> [[<source language>] <target language>]
if target missing, use DEFAULT_TARGET_LANG
if source missing, use auto'
# adjust to taste
DEFAULT_TARGET_LANG=en
if [[ $1 = -h || $1 = --help ]]
then
echo "$help"
View w3c_autovalidar.sh
extract () {
if [ -f $1 ];
then
case $1 in
*.tar) tar -xvf $1 ;;
*.tgz) tar -xvzf $1 ;;
*.tar.gz) tar -xvzf $1 ;;
*.tbz2) tar -xvjf $1 ;;
*.tar.bz2) tar -xvjf $1 ;;
*.gz) gunzip $1 ;;
View persona.js
var Persona = {
nombre: "",
getNombre: function(){
this.pensar('Entrego mi nombre<br/>');
return this.nombre;
},
setNombre: function(nombre){
this.pensar('Cambio mi nombre<br/>');
this.nombre=nombre;
},
View persona_adv.js
window.Persona = window.Persona || {};
window.Persona = (function () {
"use strict";
function Persona() {
}
var nombre = "";
Persona.prototype.getNombre = function () {
pensar('Entrego mi nombre<br/>');
You can’t perform that action at this time.