Skip to content

Instantly share code, notes, and snippets.

@leoossa
leoossa / GDPR_CV.md
Created March 22, 2020 09:16 — forked from zmilonas/GDPR_CV.md
Formułka do CV, resume, RODO GDPR Compliant resume formulae

Polski 🇵🇱

Wyrażam zgodę na przetwarzanie moich danych osobowych w celu rekrutacji zgodnie z art. 6 ust. 1 lit. a Rozporządzenia Parlamentu Europejskiego i Rady (UE) 2016/679 z dnia 27 kwietnia 2016 r. w sprawie ochrony osób fizycznych w związku z przetwarzaniem danych osobowych i w sprawie swobodnego przepływu takich danych oraz uchylenia dyrektywy 95/46/WE (ogólne rozporządzenie o ochronie danych)

English 🇪🇺

I hereby give consent for my personal data included in my application to be processed for the purposes of the recruitment process under the European Parliament's and Council of the European Union Regulation on the Protection of Natural Persons as of 27 April 2016, with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (Data Protection Directive)

//Now with less jquery
//1) go to your my-list page, and scroll to the bottom to make sure it's all loaded:
//http://www.netflix.com/browse/my-list
//2) Next, paste this in your developer tools console and hit enter:
[...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label'))
//or use this to copy the list to your clipboard:
copy([...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label')))
@leoossa
leoossa / netflix-ratings.js
Created September 14, 2020 15:09 — forked from cliffordp/netflix-ratings.js
Export Netflix's My List, Watch History, and thumbs up/down or ratings. Screenshot of Netflix Ratings vs script's output: https://cl.ly/4e15a4de21a6
// These instructions for exporting Netflix's My List, Watch History, and Ratings worked for each profile on August 4, 2019.
// 1) Go to https://www.netflix.com/browse/my-list and use https://addons.mozilla.org/firefox/addon/netflix-list-exporter/ to copy.
// 2) Go to https://help.netflix.com/en/node/101917 and follow instructions to download CSV of Watch History.
// 3) Use the snippet below in the browser's console at https://www.netflix.com/MoviesYouveSeen, then copy and paste to wherever you wish.
// Code was altered from https://www.coollector.com/netflix_import.html, but I haven't ever used their software.
// 4) Go to https://www.netflix.com/cancelplan and cancel (if that's why you're doing all this):
@leoossa
leoossa / export-search-engines-brave-nigthly.sh
Last active January 16, 2021 06:54 — forked from philc/gist:e849b48e6c5f32592d62
A script to copy Chrome's search engine settings into Vimium's settings format
#!/bin/sh
# This script lists user defined search engines in Brave Nightly.
# It replaces {inputEncoding}, which appears in some search engine definitions, with
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens.
# Location of Brave's 'Web Data' SQLite3 file
BRAVE_NIGHTLY_WEB_DATA="$HOME/.config/BraveSoftware/Brave-Browser-Nightly/Default/Web Data"
# Location to create temporary copy of 'Web Data', since the database is locked while
@leoossa
leoossa / C-states.md
Created March 3, 2021 15:42 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@leoossa
leoossa / skylake-tuning-linux.md
Created March 3, 2021 15:45 — forked from Brainiarc7/skylake-tuning-linux.md
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@leoossa
leoossa / DellXPS15_9560_AHCI_RAID.md
Created March 3, 2021 21:50 — forked from chenxiaolong/DellXPS15_9560_AHCI_RAID.md
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
@leoossa
leoossa / AlternativeTo.OP.js
Last active December 8, 2022 12:13
AlternativeTo.net - OnePager - bookmarklet
javascript: (function() {
const appListParent = document.querySelector('li[data-testid]').parentElement;
let alternativesApps = [];
document.querySelector('nav[aria-label="Pagination Navigation"]').remove(); // Remove navigation links
const container = document.createElement("div");
for (i = 2; i <= window.__NEXT_DATA__.props.pageProps.pagingMeta.totalPages; i++)
{
fetch(window.location.href + "?p=" + i).then(res =>
{
return res.text();
@leoossa
leoossa / Legimi.addToShelf.js
Created March 14, 2021 02:17
Legimi.pl - Snippet for adding book to shelf from main catalogue
// This snippet adds 'Add to Shelf' button while viewing legimi.pl catalogue
// How to add and run snippet:
// https://developers.google.com/web/tools/chrome-devtools/javascript/snippets#runcommandmenu
let books = document.querySelectorAll('.book-box');
books.forEach(book => {
let link = book.querySelector("a.book-title");
let url = link.href;
let bookId = url.slice(url.indexOf(',') + 2, url.lastIndexOf('.'));
let btn = document.createElement('button');
btn.setAttribute("onclick", "addToShelf(this)");
@leoossa
leoossa / LinVidDow
Created July 31, 2021 11:26
LinkedIn Video Downloader - bookmarklet
javascript:(function(){const videoURI = document.querySelector('video').src;window.open(videoURI);})()