Skip to content

Instantly share code, notes, and snippets.

View maccevedor's full-sized avatar

Mauricio Acevedo Rueda maccevedor

View GitHub Profile
@maccevedor
maccevedor / gist:c659be779caceae663a0
Created June 26, 2014 19:55
Bloquear con javascript caracteres especiales
//sin permiitr espacios
var r={'special':/[\W]/g}
//con espacios
var s={'special':/[^\w^ñ^(á|é|í|ó|ú)^\s^]/g}
function valid(o,w){
o.value = o.value.replace(r[w],'');
}
function validaremos(o,w){
o.value = o.value.replace(s[w],'');
@maccevedor
maccevedor / new_gist_file_0
Created June 25, 2014 14:29
Create-a-Javascript-Console-in-Sublime-Text
{
"cmd": ["/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc", "$file"],
"selector": "source.js"
}
<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
@maccevedor
maccevedor / 0_reuse_code.js
Created June 18, 2014 20:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console