Skip to content

Instantly share code, notes, and snippets.

View montogeek's full-sized avatar

Fernando Montoya montogeek

View GitHub Profile
function doTransition(c, f, n) {
var q = $("#all-content");
ads_clean();
jQuery.ajax(c, {complete: function(f) {
function B(c, f) {
var l = f.attr("data-ga");
if ("string" === typeof l)
try {
googleAnalytics(c, JSON.parse(l))
} catch (m) {
<!DOCTYPE html>
<html style="font-size: 10px">
<head>
<meta name="description" content="Publication Header Component" />
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
body {
margin: 0
}
<!DOCTYPE html>
<html style="font-size: 10px">
<head>
<meta name="description" content="Publication Header Component" />
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
body {
margin: 0
}
.wrapper {
max-width: 320px;
margin: auto;
}
@montogeek
montogeek / gist:7121181
Last active December 26, 2015 08:19
Emprendimiento para el Viernes 25 de Octubre 2013

Segunda entrega

  • Nuevo documento Canvas, con más de 60 personas encuestados.
  • Requerimientos
  • Bitacora

Notas: Se debe describir en el documento del canvas el Valor agregado, Relacion con los cientes, Canales y Segmentacion de clientes.

  • En la sección valor agregado debe haber una matrix de comparación tecnológica.
  • En la sección relación con los cliente se describe detalladamente como será esta comunicación.
@montogeek
montogeek / gist:7290941
Created November 3, 2013 14:41
Enable site Apache
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/simr
sudo nano /etc/apache2/sites-available/simr
sudo a2dissite default && sudo a2ensite simr
sudo service apache2 restart
@montogeek
montogeek / gist:7617765
Created November 23, 2013 17:54
FK a varias tablas
Tienes tablas Proveedores, Usuarios, Clientes, todos tienen varios telefonos.
Entonces se crea la tabla Telefonos y una FK a las llaves primarias de esas tablas, perooooo, resulta que eso no se puede porque no se sabe a que llave primaria referencia.
So?
Como lo solucionaría?
@montogeek
montogeek / gist:7653630
Last active December 29, 2015 09:59
Obtener tamaño base de datos MySQL
SELECT table_schema "db_name",
sum( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;
// Source: http://forums.mysql.com/read.php?108,201578,201578
// restfulizer.js
/**
* Restfulize any hiperlink that contains a data-method attribute by
* creating a mini form with the specified method and adding a trigger
* within the link.
* Requires jQuery!
*
* Ex:
* <a href="post/1" data-method="delete">destroy</a>
* // Will trigger the route Route::delete('post/(:id)')
select personas_23_dic.updated_at as OLD, personas.updated_at as NEW
from personas_23_dic
join personas
where personas_23_dic.id = personas.id
and DATE(personas.updated_at) = '2013-12-24'
order by personas.updated_at asc
// UPDATE
UPDATE personas NUEVA