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
// ==UserScript== | |
// @name Bypass xdarom.com anti-adblocker | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include https://xdarom.com* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=xdarom.com | |
// @grant none | |
// ==/UserScript== |
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
@echo off | |
:: | |
:: Checks if Microsoft Edge is installed, and uninstall it and EdgeWebView | |
:: Only Works with the newer Edge, built on Chromium | |
:: | |
:: Creator: ShadowWhisperer | |
:: Github: https://github.com/ShadowWhisperer | |
:: Created: 12/09/2020 | |
:: Updated: 07/08/2022 |
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
# Requires https://imagemagick.org/script/download.php | |
# If using windows include the installation folder in the environment PATH | |
# Invert image colors | |
convert -negate image-input.jpg image-output.jpg | |
# Apply grayscale filter | |
convert image-input.jpg -type Grayscale image-output.jpg |
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
# | |
# Usage : .\Invert-Image.ps1 .\test*.png | |
# | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null | |
Get-ChildItem $args[0] | ForEach-Object { | |
$image = New-Object System.Drawing.Bitmap($_.fullname) | |
for ($y = 0; $y -lt $image.Height; $y++) { | |
for ($x = 0; $x -lt $image.Width; $x++) { | |
$pixelColor = $image.GetPixel($x, $y) | |
$varR = 255 - $pixelColor.R |
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override |
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
// ==UserScript== | |
// @name Go Fuck Off YouTube Shorts | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include https://www.youtube.com* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== |
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 colorName(c) { | |
if (c.startsWith("#")) { | |
return `Color(0xff${c.substr(1, c.length)})`; | |
} else { | |
const color = c.split(/(\(|\))/g)[2]; | |
return `Color.fromRGBO(${color})`; | |
} | |
} | |
function varName(c) { |
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
import 'dart:typed_data'; | |
void main() async { | |
// Generate a stream that emits an [Uint8List] every second containing a single element which is the second index [c] | |
final stream = Stream.periodic(Duration(seconds: 1), (c) => Uint8List.fromList([c + 1])).asBroadcastStream(); | |
// Take only 3 seconds | |
final rawData = stream.take(3).toList(); | |
final processedData = stream.take(3).reduce((previous, current) => Uint8List.fromList([...previous, ...current])); |
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
/// Checks if [source] contains all the characters of [text] | |
/// in the correct order | |
/// | |
/// Example: | |
/// ``` | |
/// hasMatch('abcdef', 'adf') // true | |
/// hasMatch('dbcaef', 'adf') // false | |
/// ``` | |
bool hasWildcardMatch(String source, String text) { | |
final regexp = text.split('').join('.*'); |
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
def get_class_that_defined_method(meth): | |
import functools, inspect | |
if isinstance(meth, functools.partial): | |
return get_class_that_defined_method(meth.func) | |
if inspect.ismethod(meth) or (inspect.isbuiltin(meth) and getattr(meth, '__self__', None) is not None and getattr(meth.__self__, '__class__', None)): | |
for cls in inspect.getmro(meth.__self__.__class__): | |
if meth.__name__ in cls.__dict__: | |
return cls | |
meth = getattr(meth, '__func__', meth) # fallback to __qualname__ parsing | |
if inspect.isfunction(meth): |