Skip to content

Instantly share code, notes, and snippets.

View bran921007's full-sized avatar
🏠
Working from home

Fran Perez bran921007

🏠
Working from home
View GitHub Profile
@bran921007
bran921007 / gist:b00ee854c8229ab2bd35
Created August 4, 2014 00:01
Buscar query Danny
<?php
class buscador{
function encontrar($valor){
$valor = mysqli_real_escape_string(conexion::getInstancia(), $valor);
$sql = "SELECT * FROM animal where nombre like '%{$valor}%' OR raza like '%{$valor}%' OR tipo like '%{$valor}%' OR sexo like '%{$valor}%'";
$rs = mysqli_query(conexion::getInstancia(), $sql);
return $rs;
@bran921007
bran921007 / busqueda.php
Created August 4, 2014 00:05
busqueda(mostrar) Danny
<?php
include 'plantilla.php';
?>
<h3 align="center">Rellena el campo para realizar tu busqueda</h3>
<form action="busqueda.php" method="get" id="cdr">
@bran921007
bran921007 / gist:99adab7fea6c8cf816ea
Created August 4, 2014 02:33
Using LiveReload plugin Sublime
<script>document.write('<script src="http://' + (location.host || 'localhost')
.split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@bran921007
bran921007 / gist:7352450784c1ccab1df3
Created August 13, 2014 02:27
Debugging Asserts JavaScript
<html>
<head>
<title>Test Suite</title>
<script>
function assert(value, desc) {
var li = document.createElement("li");
li.className = value ? "pass" : "fail";
li.appendChild(document.createTextNode(desc));
document.getElementById("results").appendChild(li);
}
@bran921007
bran921007 / gist:c32d006e22d1168a1f5e
Created August 18, 2014 04:27
jquery agregado a javascript
var jq = document.createElement('script');
jq.src = "//code.jquery.com/jquery-latest.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
@bran921007
bran921007 / package.json
Created August 20, 2014 16:45
package.json
{
"name": "diglesica",
"version": "0.0.1",
"dependencies": {
"express":"3.3.5",
"ejs":"*",
"mysql":"*"
}
}
@bran921007
bran921007 / app.js
Created August 22, 2014 22:12
app.js
var express = require("express");
var app = express();
app.use(express.bodyParser());
require('./routes/')(app);
app.set('view engine', 'ejs');
app.listen(8000);
@bran921007
bran921007 / mustache.js
Created August 24, 2014 02:59
mustache.js templates
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/
/*global define: false*/
(function (global, factory) {
if (typeof exports === "object" && exports) {
factory(exports); // CommonJS
@bran921007
bran921007 / prefixfree.min.js
Created August 24, 2014 03:07
prefixfree.min.js libre de prefixes en css
/**
* StyleFix 1.0.3 & PrefixFree 1.0.7
* @author Lea Verou
* MIT license
*/(function(){function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}if(!window.addEventListener)return;var e=window.StyleFix={link:function(t){try{if(t.rel!=="stylesheet"||t.hasAttribute("data-noprefix"))return}catch(n){return}var r=t.href||t.getAttribute("data-href"),i=r.replace(/[^\/]+$/,""),s=(/^[a-z]{3,10}:/.exec(i)||[""])[0],o=(/^[a-z]{3,10}:\/\/[^\/]+/.exec(i)||[""])[0],u=/^([^?]*)\??/.exec(r)[1],a=t.parentNode,f=new XMLHttpRequest,l;f.onreadystatechange=function(){f.readyState===4&&l()};l=function(){var n=f.responseText;if(n&&t.parentNode&&(!f.status||f.status<400||f.status>600)){n=e.fix(n,!0,t);if(i){n=n.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,t,n){return/^([a-z]{3,10}:|#)/i.test(n)?e:/^\/\//.test(n)?'url("'+s+n+'")':/^\//.test(n)?'url("'+o+n+'")':/^\?/.test(n)?'url("'+u+n+'")':'url("'+i+n+'")'});var r=i.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");n=n.replace(RegExp("\\b(behavior:\\s*?url\\
info: Creating snapshot 0.1.1-6
info: Uploading: [=============================] 100%
error: Error running command deploy
error: Error building snapshot
error: Nodejitsu Error (500): Internal Server Error
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
help: email: <support@nodejitsu.com>
help: