Skip to content

Instantly share code, notes, and snippets.

@mathix420
mathix420 / medium.user.js
Last active April 12, 2025 22:30
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.4
// @inject-into content
@rtybanana
rtybanana / marquee.dart
Created October 1, 2021 22:08
Marquee wrapper which only scrolls if the text is large enough
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart' as wrapped;
class Marquee extends StatelessWidget {
final String text;
final TextStyle? style;
final double? textScaleFactor;
final TextDirection textDirection;
final Axis scrollAxis;
@ltOgt
ltOgt / conditional_parent_widget.dart
Created June 29, 2020 14:50
Flutter Widget to conditionally wrap a subtree with a parent without breaking the code tree
import 'package:flutter/widgets.dart';
/// Conditionally wrap a subtree with a parent widget without breaking the code tree.
///
/// [condition]: the condition depending on which the subtree [child] is wrapped with the parent.
/// [child]: The subtree that should always be build.
/// [conditionalBuilder]: builds the parent with the subtree [child].
///
/// ___________
/// Usage:
@f3401pal
f3401pal / app\build.gradle.kts
Last active April 2, 2025 04:58
Multi-module Android project with Kotlin DSL for Gradle
plugins {
`android-base-app`
`android-base`
id("io.fabric")
}
android {
defaultConfig {
versionCode = 20
versionName = "1.6.3"
/// 0 - Example `Streams`
Stream<MyUserModel> userStream => FirebaseAuth
.instance
.onAuthStateChanged
.map((user) => MyUserModel.fromFirebase(user));
String documentPath = 'my/document';
Stream<MyDocumentModel> documentStream = Firestore.instance
.document(documentPath)
.snapshots()
@steven2358
steven2358 / ffmpeg.md
Last active April 10, 2025 15:05
FFmpeg cheat sheet
@nico-lab
nico-lab / hevc_nvenc.txt
Last active March 20, 2025 01:01
ffmpeg -h encoder=hevc_nvenc
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: cuda cuda d3d11va d3d11va
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 bgra rgb0 rgba x2rgb10le x2bgr10le gbrp gbrp16le cuda d3d11
hevc_nvenc AVOptions:
-preset <int> E..V....... Set the encoding preset (from 0 to 18) (default p4)
default 0 E..V.......
slow 1 E..V....... hq 2 passes
medium 2 E..V....... hq 1 pass
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 16, 2025 04:00
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@tylermilner
tylermilner / copy_appropriate_google-service-info-plist.sh
Last active March 18, 2025 21:09
A shell script to selectively copy your GoogleService-Info.plist into your app bundle based on the current build configuration.
# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
# Get references to dev and prod versions of the GoogleService-Info.plist
# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)
GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Dev/${GOOGLESERVICE_INFO_PLIST}
GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Prod/${GOOGLESERVICE_INFO_PLIST}
# Make sure the dev version of GoogleService-Info.plist exists
echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}"
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 17, 2025 01:09
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file