Skip to content

Instantly share code, notes, and snippets.

View TahirAhmed's full-sized avatar

Tahir Ahmed TahirAhmed

View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@TahirAhmed
TahirAhmed / waitForConditionInBrowser
Last active February 4, 2020 08:25
using [waitForConditionInBrowser] method of [wd-sync]
OL.waitForTreeNode = function(text) {
OL.browser.waitForConditionInBrowser(
"var returnValue = false;\n" +
"jQuery('.scContentTreeNode').children('a').each(function() {\n" +
"if (jQuery(this).text() === '" + text + "' && jQuery(this).next().children('.scContentTreeNode').length > 0) {\n" +
"returnValue = true;\n" +
"}\n" +
"});\n" +
"return returnValue;",
OL.constants.TIMEOUT__WAIT_FOR, OL.constants.POLLING
@TahirAhmed
TahirAhmed / index.compressed.without-that-stupid-script-tag.html
Created February 24, 2014 09:45
using [htmlcompressor] without the annoying [script] tag
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <div class="main-container"> <div class="top-center-widget">top-center-widget</div> <div class="top-left-widget">top-left-widget</div> <div class="top-right-widget">top-right-widget</div> <div class="bottom-center-widget">bottom-center-widget</div> <div class="bottom-left-widget">bottom-left-widget</div> <div class="bottom-right-widget">bottom-right-widget</div> <div class="container"> <h1>tahir ahmed.</h1> </div> </div> </body> </html>
@TahirAhmed
TahirAhmed / index.compressed.html
Created February 24, 2014 09:44
using [htmlcompressor]
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <div class="main-container"> <div class="top-center-widget">top-center-widget</div> <div class="top-left-widget">top-left-widget</div> <div class="top-right-widget">top-right-widget</div> <div class="bottom-center-widget">bottom-center-widget</div> <div class="bottom-left-widget">bottom-left-widget</div> <div class="bottom-right-widget">bottom-right-widget</div> <div class="container"> <h1>tahir ahmed.</h1> </div> </div> <script type="text/javascript">var debugMode="debug",body=document.body||document.getElementsByTagName("body")[0],head=document.getElementsByTagName("head")[0],scriptTagName="script",scriptType="text/javascript",linkTagName="link",linkType="text/css",linkRelation="stylesheet",scriptSrc="src",linkHref="href",stylesPrefix="styles/",scriptsPre
@TahirAhmed
TahirAhmed / index.htmlmin.without-that-stupid-script-tag.html
Created February 24, 2014 09:44
using [htmlmin] but without the annoying [script] tag
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1"></head><body><div class="main-container"><div class="top-center-widget">top-center-widget</div><div class="top-left-widget">top-left-widget</div><div class="top-right-widget">top-right-widget</div><div class="bottom-center-widget">bottom-center-widget</div><div class="bottom-left-widget">bottom-left-widget</div><div class="bottom-right-widget">bottom-right-widget</div><div class="container"><h1>tahir ahmed.</h1></div></div></body></html>
@TahirAhmed
TahirAhmed / index.htmlmin.html
Created February 24, 2014 09:43
using [htmlmin]
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1"></head><body><div class="main-container"><div class="top-center-widget">top-center-widget</div><div class="top-left-widget">top-left-widget</div><div class="top-right-widget">top-right-widget</div><div class="bottom-center-widget">bottom-center-widget</div><div class="bottom-left-widget">bottom-left-widget</div><div class="bottom-right-widget">bottom-right-widget</div><div class="container"><h1>tahir ahmed.</h1></div></div><script type="text/javascript">var debugMode = 'debug', body = document.body || document.getElementsByTagName('body')[0], head = document.getElementsByTagName('head')[0], scriptTagName = 'script', scriptType = 'text/javascript', linkTagName = 'link', linkType = 'text/css', linkRelation = 'stylesheet', scriptSrc = 'src', linkHref = 'href', stylesPrefix = 'styles
@TahirAhmed
TahirAhmed / index.html
Last active August 29, 2015 13:56
create [link] & [script] tags, append them to head & body for [plugins] & [app] CSS & JS respectively, conditionally loading minified or debuggable versions of the files i.e. [{plugins,app}.min.{css,js}] depending on the query string [?debug=true]. Should produce the desired result as shown in the commented out code inside [head] & [body] tags.
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<link rel="stylesheet" href="styles/plugins.min.css">
<link rel="stylesheet" href="styles/app.min.css">-->