Skip to content

Instantly share code, notes, and snippets.

View fdorantesm's full-sized avatar
📫
Open to work

Fernando Dorantes fdorantesm

📫
Open to work
View GitHub Profile
@fdorantesm
fdorantesm / index.php
Created August 27, 2016 05:51
Simple parser
<?
function parse($view,$data){
$vars = array();
foreach($data as $key=>$value){
$vars[] = '{'.$key.'}';
}
@fdorantesm
fdorantesm / err.json
Created August 12, 2017 22:47
Mongoose duplicated key
{
"status": 400,
"message": "insertDocument :: caused by :: 11000 E11000 duplicate key error index: morado.properties.$cert_1 dup key: { : \"predial2.pdf\" }",
"data": {
"code": 11000,
"index": 0,
"errmsg": "insertDocument :: caused by :: 11000 E11000 duplicate key error index: morado.properties.$cert_1 dup key: { : \"predial2.pdf\" }",
"op": {
"updatedAt": "2017-08-12T22:43:06.593Z",
"createdAt": "2017-08-12T22:43:06.593Z",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fdorantesm
fdorantesm / Queretaro.geojson
Last active October 3, 2017 15:15 — forked from anonymous/map.geojson
Queretaro metropolitan area
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fdorantesm
fdorantesm / map.geojson
Last active October 3, 2017 19:34
Geofence Yapp Querétaro
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fdorantesm
fdorantesm / map.geojson
Last active October 12, 2017 15:28
Geocerca de Tepatitlán de Morelos
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fdorantesm
fdorantesm / helpers.php
Created February 9, 2018 17:10
Human implode
<?php
function human_implode($glue = ",", $last = "y", $elements = array(), $filter = null){
if ($filter) {
$elements = array_map($filter, $elements);
}
$str = implode("{$glue} ", $elements);
@fdorantesm
fdorantesm / sessions.php
Created February 22, 2018 22:29
PHPSESSID Helper functions
<?php
function decode_session($data){
$temp = $_SESSION;
session_decode($data);
$out = $_SESSION;
$_SESSION = $temp;
return $out;
}
@fdorantesm
fdorantesm / maps.html
Created March 14, 2018 17:53
Google maps
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="yo" style="width: 480px; height:320px;"></div>
<div id="taq" style="width: 480px; height:320px;"></div>
<div id="genotipo" style="width: 480px; height:320px;"></div>
<script src="maps.js"></script>