Skip to content

Instantly share code, notes, and snippets.

View IbrahimTanyalcin's full-sized avatar
☸️
revisiting-old-concepts.reinventing-the-wheel.☸

Ibrahim Tanyalcin IbrahimTanyalcin

☸️
revisiting-old-concepts.reinventing-the-wheel.☸
View GitHub Profile
@IbrahimTanyalcin
IbrahimTanyalcin / nonRenderBlocking.js
Created April 18, 2018 12:10
Taskq -> Medium -> Part3 -> NonRenderBlocking -> nonRenderBlocking.js
!function(){
function nonRenderBlocking(){
taskq.load("./script0.js");
taskq.load("./script1.js");
taskq.load("./script2.js");
}
nonRenderBlocking._taskqId = "nonRenderBlocking";
taskq.push(nonRenderBlocking);
}();
@IbrahimTanyalcin
IbrahimTanyalcin / minimal.html
Created April 17, 2018 12:44
Taskq -> Medium -> Part3 -> NonRenderBlocking -> minimal.html
<!DOCTYPE html>
<html lang="en" style="font-size:24px;">
<head>
<meta charset="utf-8">
<style>
</style>
</head>
<body>
<div class="row" style="text-align:center;padding:100px;font-size:1rem;line-height:200%;font-family:Helvetica,Arial;color:DimGray"></div>
<script type="text/javascript" src="../../../taskq.js" charset="UTF-8"></script>
@IbrahimTanyalcin
IbrahimTanyalcin / script2.js
Created April 17, 2018 11:05
Taskq -> Medium -> Part3 -> renderBlocking -> script2.js
!function(){
texts.push("script2");
}()
@IbrahimTanyalcin
IbrahimTanyalcin / script1.js
Created April 17, 2018 11:01
Taskq -> Medium -> Part3 -> renderBlocking -> script1.js
!function(){
texts.push("script1");
}()
@IbrahimTanyalcin
IbrahimTanyalcin / script0.js
Created April 17, 2018 10:55
Taskq -> Medium -> Part3 -> renderBlocking -> script0.js
!function(){
texts = [];
texts.push("script0");
}()
@IbrahimTanyalcin
IbrahimTanyalcin / minimal.html
Created April 17, 2018 10:53
Taskq -> Medium -> Part3 -> renderBlocking -> minimal.html
<!DOCTYPE html>
<html lang="en" style="font-size:24px;">
<head>
<meta charset="utf-8">
<style>
</style>
<script type="text/javascript" src="./script0.js" charset="UTF-8"></script>
<script type="text/javascript" src="./script1.js" charset="UTF-8"></script>
<script type="text/javascript" src="./script2.js" charset="UTF-8"></script>
</head>
@IbrahimTanyalcin
IbrahimTanyalcin / linkedin help - 20180222 - 1
Last active February 26, 2018 18:08
linkedin help - 20180222 - 1
var obj = {value:3,stop:false}, //assing your value to obj.value every sec etc.
values = [], //array to store values
freq = 500, //frequency of check
result = undefined; //the result of average in the end
function checker(t){ //the function to periodically check
checker.startTime = checker.startTime || t;
if(obj.stop){ //if you set obj.stop to true, you will terminate the check
/*in the end calculate the result
if you want, store the a.length somewhere else
@IbrahimTanyalcin
IbrahimTanyalcin / styles.css
Created February 21, 2018 13:17
taskq_styles.css
html {
font-size:16px;
font-family:Helvetica, Arial, "sans-serif";
color:DimGray;
cursor:pointer;
}
html * {
box-sizing:border-box;
-webkit-user-select: none;
-moz-user-select: none;
@IbrahimTanyalcin
IbrahimTanyalcin / minimal.html
Created February 21, 2018 13:16
taskq_minimal.html
<!DOCTYPE html>
<html lang="en" style="font-size:24px;">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="../../taskq.js" charset="UTF-8"></script>
<script type="text/javascript" src="./index.js" charset="UTF-8" async></script>
</head>
<body>
<div class="row">
</div>
@IbrahimTanyalcin
IbrahimTanyalcin / buttons.js
Created February 21, 2018 13:15
taskq_buttons.js
!function(){
/*I will use this variable for storing frames
for button clicks below*/
var resetFrame;
function makeButtons(exports){
/*create an 2 element array of arrays,
I will chain forEach to generate buttons
using the button function*/
[
[