Skip to content

Instantly share code, notes, and snippets.

@mikatalk
mikatalk / gist:6733231
Created September 27, 2013 18:41
Find all email addresses in a string (*not validation):
var s:String = "[email protected] hey wasup! , [email protected] [email protected]";
var rex:RegExp = /[^\s,]+@[^\s,]+/g;
trace( s.match(rex).join(",") );
alert("xss");
@mikatalk
mikatalk / gist:abde0ed6710384bb88a8
Created September 19, 2014 21:17
Android Export video and convert to gif
~/Desktop/temp ᐅ adb shell screenrecord /sdcard/kitkat.mp4
~/Desktop/temp ᐅ ffmpeg -i kitkat.mp4 -vf scale=320:-1 -r 10 ffout%03d.png
~/Desktop/temp ᐅ convert -delay .1 -loop 0 ffout*.png output.gif
@mikatalk
mikatalk / xss.js
Last active October 3, 2015 18:24
xss.js
alert('XSS');
@mikatalk
mikatalk / xss.html
Created October 3, 2015 18:26
xss.html
<script>alert('XSS');</script>
@mikatalk
mikatalk / gist:045ef797f33c85df4ad2
Created November 6, 2015 00:47
Asset Loader Singleton
package com.samere
{
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
@mikatalk
mikatalk / gist:50a5d17bef128efa8a50
Created November 6, 2015 05:52
wordnet-magic example - code review
var inspect = require('util-inspect');
var wordNet = require('util')
var wordNet = require('wordnet-magic')
var wn = wordNet(__dirname + '/sqlite-31.db', false)
var input = 'the cat is patiently waiting at some of the best hospitals in Los Angeles'
var words = input.split(' ')
var sort = { nouns:[], verbs:[], adjectives:[], adverbs:[] }
processWord(0)
@mikatalk
mikatalk / gist:1159a579ea2f2f97aa76
Last active November 6, 2015 19:33
wordnet-magic example - code review
var inspect = require('util-inspect');
var wordNet = require('util')
var wordNet = require('wordnet-magic')
var wn = wordNet(__dirname + '/sqlite-31.db', false)
var input = 'the cat is patiently waiting at some of the best hospitals in Los Angeles'
var words = input.split(' ')
var sort = { nouns:[], verbs:[], adjectives:[], adverbs:[] }
processWord(0)
@mikatalk
mikatalk / gist:7e722cc2d338f16aaa4e
Created November 12, 2015 16:28
Unfollow non-followers
$('.ProfileCard.js-actionable-user').each( function(index){
if ( !$( this ).find('.FollowStatus').length ) {
$( this ).find('.user-actions-follow-button.js-follow-btn.follow-button').click();
}
});
var THREE = require( 'three' );
var OrbitControls = require( 'three-orbit-controls' );
var ColladaLoader = require( '../../libs/loaders/ColladaLoader' );
import * as dat from '../../libs/utils/dat.gui.min';
const SIZE = 256;
const vertexShader = `
precision highp float;