Skip to content

Instantly share code, notes, and snippets.

var redParts = document.querySelectorAll(".ytp-play-progress.ytp-swatch-background-color");
var fullCurrentWidth = (redParts.length) * 2*(-1);
var fullWidth = (redParts.length - 1) * 2*(-1);
redParts.forEach((e, index) => {
var width = Number(e.parentElement.parentElement.style.width.replace("px", ""));
var scale = parseFloat(e.style.transform.replace("scaleX(", "").replace(")", ""));
var currentWidth = width * scale;
fullCurrentWidth += (index == redParts.length -1 && scale != 0) ? parseFloat(currentWidth) + 1*2*(-1) : parseFloat(currentWidth);
fullWidth += parseFloat(width);
@dijux
dijux / manifest.json
Last active July 4, 2022 14:31
manifest.json for firebox
{
"manifest_version": 2,
"name": "My Notes",
"description": "Take notes in your favorites websites",
"version": "1.1",
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_popup": "popup.html",
@dijux
dijux / index.html
Created October 12, 2021 19:10
Landing Page — Tailwind CSS
<header class="text-gray-700 body-font border-b border-gray-200">
<div class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center">
<a class="flex title-font font-medium items-center text-gray-900 mb-4 md:mb-0" href="https://tailblocks.cc" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-10 h-10 text-white p-2 bg-indigo-500 rounded-full" viewBox="0 0 24 24">
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"></path>
</svg>
<span class="ml-3 text-xl">TAILBLOCKS</span>
</a>
<nav class="md:ml-auto flex flex-wrap items-center text-base justify-center">
<a class="mr-5 hover:text-gray-900">First Link</a>
@dijux
dijux / dashboard-ui.markdown
Created October 12, 2021 19:09
Dashboard UI
@dijux
dijux / embedded-file-viewer.md
Created May 11, 2021 00:36 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@dijux
dijux / docker-php-ext-install.md
Created April 5, 2021 22:08 — forked from giansalex/docker-php-ext-install.md
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@dijux
dijux / superhead.html
Created October 31, 2020 14:15 — forked from shawn-crigger/superhead.html
My HTML head meta tags
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//ajax.googleapis.com">
<link rel="dns-prefetch" href="//farm7.staticflickr.com">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/