Skip to content

Instantly share code, notes, and snippets.

View JuanCrg90's full-sized avatar

Juan Carlos Ruiz JuanCrg90

View GitHub Profile
@JuanCrg90
JuanCrg90 / HelloJsZip.js
Last active October 21, 2015 22:37
JSZip example
//Example of use https://stuk.github.io/jszip/
var zip = new JSZip();
zip.file('Hello.txt', 'Hello World\n');
var img = instance.zip.folder('images');
var testImage = '/9j/4AAQSkZJRgABAgAAAQABAAD/7QA2UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAABkcAmcAFERKaFM0cG44SUZKV3U0d0x0bnRTAP/iAhxJQ0NfUFJPRklMRQABAQAAAgxsY21zAhAAAG1udHJSR0IgWFlaIAfcAAEAGQADACkAOWFjc3BBUFBMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD21gABAAAAANMtbGNtcwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACmRlc2MAAAD8AAAAXmNwcnQAAAFcAAAAC3d0cHQAAAFoAAAAFGJrcHQAAAF8AAAAFHJYWVoAAAGQAAAAFGdYWVoAAAGkAAAAFGJYWVoAAAG4AAAAFHJUUkMAAAHMAAAAQGdUUkMAAAHMAAAAQGJUUkMAAAHMAAAAQGRlc2MAAAAAAAAAA2MyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHRleHQAAAAARkIAAFhZWiAAAAAAAAD21gABAAAAANMtWFlaIAAAAAAAAAMWAAADMwAAAqRYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9jdXJ2AAAAAAAAABoAAADLAckDYwWSCGsL9hA/FVEbNCHxKZAyGDuSRgVRd13ta3B6BYmxmnysab9908PpMP///9sAQwAJBgcIBwYJCAgICgoJCw4XDw4
@JuanCrg90
JuanCrg90 / updatePython.sh
Created October 8, 2015 17:40
Update the python3 symlinks to python2 in arch linux
cd /usr/bin
sudo ln -sf python2 python
sudo ln -sf virtualenv2 virtualenv
@JuanCrg90
JuanCrg90 / runner.js
Last active August 29, 2015 14:26 — forked from phanan/runner.js
Record a webpage with PhantomJS and FFMpeg
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;
@JuanCrg90
JuanCrg90 / Tricky_curly_brace.js
Last active August 29, 2015 14:17
Tricky curly brace
var func = function(){
return
{
name :"JuanCrg90"
};
}
console.log(func());