Skip to content

Instantly share code, notes, and snippets.

View yilmazdurmaz's full-sized avatar
🏠
Working from home

Yılmaz Durmaz yilmazdurmaz

🏠
Working from home
  • Turkey
View GitHub Profile
@yilmazdurmaz
yilmazdurmaz / _Remove annoying youtube divs.js
Last active June 19, 2021 04:55
Remove annoying youtube divs obfuscating the view in high contrast screen settings - tampermonkey script
// ==UserScript==
// @name _Remove annoying youtube divs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description these two divs are obfuscating/redacting the videos when in high constrast mode selected, at least for windows 10
// @author yilmazdurmaz
// @include
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @match http*://*/*
// @icon
@yilmazdurmaz
yilmazdurmaz / gena.js
Created January 16, 2020 08:10 — forked from livoras/gena.js
Genetic Algorithm in JavaScript
class Gena {
constructor(config) {
this.currentGeneration = 0
this.populations = []
this.fitnesses = []
this.mutateProbability = config.mutateProbability || 0.5 // 0 ~ 1
this.generationsSize = config.generationsSize || 100
this.populationSize = config.populationSize || 100
this.doneFitness = config.doneFitness || 1 // 0 ~ 1
@yilmazdurmaz
yilmazdurmaz / code.js
Created August 16, 2019 22:23
include a library on chrome debug tools
(function (name,url) {
if (typeof window[name] === 'undefined') {
var s = document.createElement('script');
s.setAttribute('src', url);
document.body.appendChild(s);
}
}("jQuery","https://code.jquery.com/jquery-3.4.1.min.js"));
//not possible if CORS(!) or CSP
@yilmazdurmaz
yilmazdurmaz / m3u8.md
Created February 15, 2019 10:11 — forked from primaryobjects/m3u8.md
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
// ==UserScript==
// @name Image Proxier YD
// @namespace https://github.com/YD/Userscripts
// @version 1.2
// @description Replaces images from stack.imgur.com and collates them
// @author GrumpyCrouton, YILMAZ DURMAZ
// @match *://*.stackoverflow.com/*
// @match *://*.stackexchange.com/*
// @match *://*.superuser.com/*
// @grant GM.xmlHttpRequest