- Preface
- Quick Reference
- General Naming
- Specific Naming
- Layout
- Variables
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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 | |
$data = array( | |
'labels' => array( | |
array('string' => 'Sample'), | |
array('number' => 'Piston 1'), | |
array('number' => 'Piston 2') | |
), | |
'data' => array( | |
array('S1', 74.01, 74.03), |
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 | |
$data = array( | |
'labels' => array( | |
array('string' => 'Sample'), | |
array('number' => 'Piston 1'), | |
array('number' => 'Piston 2') | |
), | |
'data' => array( | |
array('S1', 74.01, 74.03), |
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 | |
$data = array( | |
'labels' => array( | |
array('string' => 'Sample'), | |
array('number' => 'Piston 1'), | |
array('number' => 'Piston 2') | |
), | |
'data' => array( | |
array('S1', 74.01, 74.03), |
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
var Tabla2Excel = (function() { | |
var uri = 'data:application/vnd.ms-excel;base64,', | |
template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>', | |
base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }, | |
format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } | |
return function(table, nombre) { | |
if (!table.nodeType) table = document.getElementById(table) | |
var ctx = {worksheet: nombre || 'Worksheet', table: table.innerHTML} | |
window.location.href = uri + base64(format(template, ctx)) | |
} |
##Create an alias to MAMP's PHP installation
To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.
Within the terminal, run:
nano ~/.bash_profile
This will open nano with the contents, at the top in a blank line add the following line:
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
// Variables que deben ser cargadas al principio de todo el codigo js para identificar variables globales. | |
var direcciones; //Esta variable tendra la polilinea con la ruta | |
var direccionServicio = new google.maps.DirectionsService();// Este es el servicio que hara el calculo de las direcciones | |
var map; //Mapa declarado como global para instanciar otros servicios. | |
//Adicionalmente despues que cargaste tu mapa, agregas esta linea, despues de map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); o algo simiilar | |
direcciones.setMap(mapa); | |
/*Funcion que se invoca para calcular la ruta |
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
//This fragment goes in your config/http.js file. | |
//Ensure to install skipper previusly... | |
//Tested in Sails.js v0.10.5 | |
module.exports.http = { | |
bodyParser: (function () { | |
var opts = {limit:'50mb'}; | |
var fn; |
OlderNewer