Skip to content

Instantly share code, notes, and snippets.

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

Muhammet Şükrü Demir dsm

🏠
Working from home
View GitHub Profile
@dsm
dsm / fast_sqrt.h
Last active April 22, 2022 12:36
fast sqrt
/*http://www.lomont.org/papers/2003/InvSqrt.pdf*/
float fsqrtf(float x) {
if(x<0.0f){
return __builtin_nanf("");
}
const float xhalf = 0.5f * x;
union {
float x;
int i;
@dsm
dsm / shorts_filter.txt
Last active June 22, 2022 18:09
Youtube_short_ublock_filter
! 2022-03-08 https://www.youtube.com
www.youtube.com##ytd-guide-entry-renderer.ytd-guide-section-renderer.style-scope > .ytd-guide-entry-renderer.style-scope.yt-simple-endpoint:has-text(Shorts)
! 2022-05-18 https://www.youtube.com
www.youtube.com##.ytd-item-section-renderer.style-scope > .ytd-reel-shelf-renderer.style-scope
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(#video-title-link[title~="#short" i])
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(#video-title-link[title~="#shorts" i])
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(#video-title-link[title~="#Short" i])
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(#video-title-link[title~="#Shorts" i])
@dsm
dsm / meas_time_diff.cpp
Created September 4, 2020 13:24
Measuring time difference
#include <chrono>
#include <iostream>
int main() {
decltype(auto) start{std::chrono::steady_clock::now()};
/*put somefunc();*/
decltype(auto) end{std::chrono::steady_clock::now()};