Skip to content

Instantly share code, notes, and snippets.

View a-guerrero's full-sized avatar

Adrián Guerrero González a-guerrero

View GitHub Profile

Angular Commit Guidelines

[Github][1]

Cada commit consiste de un encabezado, un cuerpo y un pie de página. El encabezado tiene un formato especial que consiste de tipo, contexto y descripción.

<tipo>(<contexto>): <descripción>
@a-guerrero
a-guerrero / html5-canvas-post-to-facebook-base64.js
Created November 4, 2015 19:27
Post a BASE64 Encoded PNG Image to facebook
// Post a BASE64 Encoded PNG Image to facebook
function PostImageToFacebook(authToken) {
var canvas = document.getElementById("c");
var imageData = canvas.toDataURL("image/png");
try {
blob = dataURItoBlob(imageData);
} catch (e) {
console.log(e);
}
var fd = new FormData();
@a-guerrero
a-guerrero / FileReaderAPI.md
Created October 20, 2015 15:53
Access user files and their content from their machine without needing to upload to your server.

[Full Article][1]

document.getElementById('upload-file').addEventListener('change', function() {
	var file;
	var destination = document.getElementById('destination');
	destination.innerHTML = '';

	// Looping in case they uploaded multiple files
	for(var x = 0, xlen = this.files.length; x &lt; xlen; x++) {