Skip to content

Instantly share code, notes, and snippets.

View cornedor's full-sized avatar
🚀
gotta go fast

Corné Dorrestijn cornedor

🚀
gotta go fast
View GitHub Profile
@cornedor
cornedor / Main.hx
Created October 4, 2013 14:00
Exploding images
package;
import flash.display.BitmapData;
import flash.display.Loader;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.Lib;
import flash.net.URLRequest;
import flash.utils.Timer;
import flash.Vector;
import haxe.FastList;
@cornedor
cornedor / gist:6591520
Last active December 23, 2015 06:08 — forked from anonymous/gist:6591494
<input id="yourinput" type="email" name="email" id="email" />
<script>
document.querySelector("#yourinput").addEventListener('click', function(e) {
console.log(e.target);
$(e.target).jeJqueryShit();
}, false);
</script>
@cornedor
cornedor / thumbnail.php
Created June 27, 2013 11:02
Crops images to a smaller or bigger size.
<?php
/**
* This classes allows you to create thumbnails. Input images will be resized,
* while the ratio keeps intact, and will cropped to the size given.
* @author Corné Dorrestijn
* @license http://www.gnu.org/copyleft/lesser.html GNU Library General Public License
* @package Default
*/
class Thumbnail
{
@cornedor
cornedor / gist:5476948
Created April 28, 2013 13:52
Mondriaan LD26 entry
package;
import flash.display.MovieClip;
import flash.display.CapsStyle;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.external.ExternalInterface;
import flash.Lib;
class Main extends MovieClip
@cornedor
cornedor / WayToSimpleSlider.js
Created April 26, 2013 10:39
Way to simple slider.
var sidebarSlider = function() {
var frame = 0;
setInterval(function() {
frame++;
$("div#sidebarslider ul").css("margin-left", (-frame%1332) + "px");
}, 30);
}
// <div id="sidebarslider">
// <ul>
#!/bin/sh
SIZE="1920x1080"
BITRATE="32k"
FRAMERATE="20"
KEY="KEY_HERE"
TIMESTAMP=$(date "+%m-%d-%y-%H%M")
ffmpeg\
-f x11grab -s $SIZE -r $FRAMERATE -i :0.0\
-f alsa -ac 2 -i pulse\
-vcodec libx264 -preset ultrafast\
var i = 0;
function loop(callback)
{
if(++i > 10) return callback === undefined ? undefined : callback();
console.log(i);
setTimeout(function(){loop(callback);}, 200);
}
loop(function(){console.log('done');});
@cornedor
cornedor / comment.md
Last active August 29, 2015 14:19
Using "-->" as a single line comment.

Using "-->" as a single line comment.

Typing --> on the beginning of a line of code in JavaScript seems to comment it. But looks like there isn't almost no info available about this.

What i found so far is a v8 (test)[https://github.com/crosswalk-project/v8-crosswalk/blob/master/test/webkit/parser-xml-close-comment.js] that does test for this feature. So it looks like it is done intentionally.

Looks like v8 and Firefox's JS engine do both parse this correctly. MuJS does throw an syntax error

SyntaxError: test.js:2: unexpected token in expression: '&gt;'