This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Youtube fixes | |
www.youtube.com##.ytd-rich-section-renderer.style-scope > .ytd-rich-shelf-renderer.style-scope | |
www.youtube.com##.ytp-gradient-bottom | |
! Prevent meta tracking | |
$3p,to=facebook.*|instagram.com,from=~facebook.*|~instagram.com|~messenger.com|~threads.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- View to easily query the leaked RARBG torrent DB. | |
CREATE VIEW magnet_links as | |
SELECT id, title, cat, size, 'magnet:?xt=urn:btih:' || hash as magnetLink, imdb, dt | |
FROM items | |
ORDER BY dt DESC; | |
-- Example query: | |
SELECT * FROM magnet_links | |
WHERE title LIKE '%Apocalypse.Now.1979.Theatrical%' | |
LIMIT 501 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shutdown WSL2 | |
wsl --shutdown | |
# If Hyper-V management tools + powershell module is enabled | |
optimize-vhd -Path "$($env:USERPROFILE)\AppData\Local\Docker\wsl\data\ext4.vhdx" -Mode full | |
# Otherwise use diskpart | |
diskpart | |
select vdisk file="$($env:USERPROFILE)\AppData\Local\Docker\wsl\data\ext4.vhdx" | |
attach vdisk readonly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf /Library/Developer/CommandLineTools | |
sudo xcode-select --install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function engine(movesArray) { | |
const board = [...Array(3)].map(x => Array(3).fill(false)); | |
const magicSquare = [4, 9, 2, 3, 5, 7, 8, 1, 6]; | |
const p1Symbol = "X"; | |
const p2Symbol = "O"; | |
let winner = null; | |
let turnCounter = 0; | |
let isP1Turn = true; | |
while ((winner = checkForWinner(board)) === null && areThereEmptySpacesOnBoard() === true) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetCategoriesByProductsCount(ProductShopContext context) | |
{ | |
var categories = context.Categories | |
.OrderByDescending(c => c.CategoryProducts.Count) | |
.Select(x => new | |
{ | |
Category = x.Name, | |
ProductsCount = x.CategoryProducts.Count, | |
AveragePrice = $"{x.CategoryProducts.Average(c => c.Product.Price):F2}", | |
TotalRevenue = $"{x.CategoryProducts.Sum(c => c.Product.Price)}" |