This file contains 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
# author: | |
# @Bartosz Kosarzycki | |
# | |
sudo apt-get install npm | |
sudo npm install -g react-native-cli | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
cd /home/user/your/project/path | |
react-native init AwesomeProject | |
cd AwesomeProject |
This file contains 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
<html> | |
<head> | |
<title>HTML5 Folder Upload Test</title> | |
</head> | |
<body> | |
<div id="container"> | |
<input type="file" id="file_input" name="file_input_folder[]" | |
multiple webkitdirectory="" mozdirectory="true" directory="" /> | |
</div> | |
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> |
This file contains 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
// 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; |
This file contains 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
// LZW-compress a string | |
function lzw_encode(s) { | |
var dict = {}; | |
var data = (s + "").split(""); | |
var out = []; | |
var currChar; | |
var phrase = data[0]; | |
var code = 256; | |
for (var i=1; i<data.length; i++) { | |
currChar=data[i]; |
This file contains 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 CubicBezier = function(canvas, opts){ | |
if(!opts) opts = {}; | |
this.start = opts.start || new Vec2(100,100); | |
this.end = opts.end || new Vec2(400, 400); | |
this.c1 = opts.c1 || new Vec2(100, 300); | |
this.c2 = opts.c2 || new Vec2(300, 100); | |
this.curve = new fabric.Path( this.toSVGPath() ); |