Skip to content

Instantly share code, notes, and snippets.

View CGastrell's full-sized avatar

Christian Gastrell CGastrell

View GitHub Profile
@CGastrell
CGastrell / droppable.js
Created October 15, 2014 02:19
tha droppable
jQuery.widget("shovelapps.buildable", {
options: {
platformBaseUrl: ""
},
_create: function() {
var _this = this,
box = this.element;
this.styleBox();
box.on('dragenter', doNothing);
@CGastrell
CGastrell / index.js
Created June 25, 2014 22:00
Mini server para recibir un archivo zip
//para probar, correr con node y en otra consola consolear:
//curl --request PUT 'http://localhost:8000/put' --upload-file archivo.zip
var http = require('http');
var fs = require('fs');
http.createServer(function(request,response){
response.writeHead(200);
var destinationFile = fs.createWriteStream("destination.zip");
request.pipe(destinationFile); // aca esta la magia, use wisely
@CGastrell
CGastrell / cargarXML.html
Created August 8, 2013 16:19
Ejemplo para cargar un XML y parsear los marcadores para meter en un mapa argenmap()
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://www.ign.gob.ar/argenmap/argenmap.jquery.min.js"></script>
<script>
$(function() {