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 / .block
Last active December 19, 2017 05:14
lexicon-distribute Synchronous & Sorted
height: 800
width: 800
scrolling: yes
@IbrahimTanyalcin
IbrahimTanyalcin / .block
Last active January 1, 2020 10:57
lexicon-seq Synchroned
height: 800
width: 800
scrolling: yes
@IbrahimTanyalcin
IbrahimTanyalcin / README.md
Last active January 10, 2018 11:47
hexBinSort

Test for rawgit

@IbrahimTanyalcin
IbrahimTanyalcin / message.js
Created February 21, 2018 13:08
taskq_message.js
!function(){
function messenger(exports){
/*export the message so it is visible for other functions*/
exports.message = message;
/*function for message generator*/
function message(text){
var div = document.createElement("div");
message.count = message.count || 0;
message.div = message.div || document.getElementsByClassName("sideCar")[0];
message.div.appendChild(div);
@IbrahimTanyalcin
IbrahimTanyalcin / loadStyles.js
Created February 21, 2018 13:09
taskq_loadStyles.js
!function(){
function loadStyles(){
var link = document.createElement("link");
link.href = "./styles.css";
link.type = "text/css";
link.rel = "stylesheet";
document.head.appendChild(link);
};
taskq.push(loadStyles);
}();
@IbrahimTanyalcin
IbrahimTanyalcin / index.js
Created February 21, 2018 13:10
taskq_index.js
!function(){
/*in our main thread there is only index function
so there is no need to use _taskqId or _taskqWaitFor.
We define the function and directly do taskq.push
to start the main thread.*/
function index(exports){
/*start by loading the message generator
then wait 3 seconds before proceeding next*/
taskq.load("./message.js")
.then(function(){
@IbrahimTanyalcin
IbrahimTanyalcin / githubButtons.js
Created February 21, 2018 13:13
taskq_githubButtons.js
!function(){
function githubButtons(exports){
exports.message("Let's add some github corner!;");
var anchor = document.querySelector("a.github-corner");
anchor.innerHTML = '<svg width="180" height="180" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C
@IbrahimTanyalcin
IbrahimTanyalcin / draw.js
Created February 21, 2018 13:14
taskq_draw.js
!function(){
function draw(exports){
/*instead of recreating similar divs,
I will make one template div, store it
in exports and then clone it each time.*/
if(!exports.point) {
var div = document.createElement("div");
div.className = "point";
exports.point = 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*/
[
[
@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>