Skip to content

Instantly share code, notes, and snippets.

View amasad's full-sized avatar
🎱
balling

Amjad Masad amasad

🎱
balling
View GitHub Profile
gapi, ___jsl, osapi, shindig, gadgets, iframer, iframes, ToolbarApi, IframeBase, Iframe, IframeProxy, IframeWindow, __gapi_jstiming__,googleapisv0, csrf_token, csrf_param
function bf (code) {
task.spawn(function () {
var codeSize = code.length;
var i = 0, cp = 0, dp = 0, m = {};
var loopIn = {}, loopOut = {};
var tmp = [];
for ( var cp = 0; cp < codeSize ; cp++ )
if ( code[cp] == '[' )
tmp.push(cp);
function bf (code) {
var codeSize = code.length;
var cp = 0, dp = 0, m = {};
var loopIn = {}
, loopOut = {}
, tmp = [];
for (cp = 0; cp < codeSize ; cp++)
if (code[cp] == '[') tmp.push(cp);
function bf (code) {
var codeSize = code.length;
var ip = 0, cp = 0, dp = 0, m = {};
var loopIn = {}
, loopOut = {}
, tmp = [];
for (cp = 0; cp < codeSize ; cp++)
if (code[cp] == '[') tmp.push(cp);
function bf (code) {
var codeSize = code.length;
var i = 0, ip = 0, cp = 0, dp = 0, m = {};
var loopIn = {}, loopOut = {};
var tmp = [];
for ( var cp = 0; cp < codeSize ; cp++ )
if ( code[cp] == '[' )
tmp.push(cp);
else
WorkerClient = ace.require('ace/worker/worker_client').WorkerClient;
WorkerClient.prototype.$guessBasePath = function () {
var loc = window.location;
return loc.protocol + '//' + loc.host + '/assets/ace/';
};
// This is fine.
new Worker('/path/to/script.js');
// Error: SECURITY_ERR: DOM Exception 18
new Worker('http://someotherdomain.com/path/to/script.js');
Editor.prototype.setMode = function (language) {
var mode = MODES[language].mode;
this.editor.getSession().setMode(mode);
};
Editor.prototype.setMode = function (language) {
this.editor.setMode('mode', language);
};
var runMode = function (code, language, elem) {
var $elem = $(elem),
// MODES is a hash containing all ace modes we support.
mode = MODES[lang.toLowerCase()].mode,
lines = code.split('\n'),
// Tokenizer initial state.
last = 'start',