Skip to content

Instantly share code, notes, and snippets.

@kidd
kidd / kill_paywall.user.js
Last active September 11, 2022 20:05
disable paywal for medium et al
// ==UserScript==
// @name TowardsDataScience/hbr/medium auto open in incognito
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Raimon Grau
// @match https://towardsdatascience.com/*
// @match https://hbr.org/*
// @match https://medium.com/*
// @match https://*.medium.com/*
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active September 14, 2024 06:05
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support. This project is no longer maintained: Please see the following projects: https://github.com/darknebular/Wrapper_VideoStation/ - https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
// The SwiftUI Lab
// Website: https://swiftui-lab.com
// Article: https://swiftui-lab.com/alignment-guides
import SwiftUI
class Model: ObservableObject {
@Published var minimumContainer = true
@Published var extendedTouchBar = false
@Published var twoPhases = true
@pantelis
pantelis / vboxguestadditions_maxos.md
Created February 4, 2018 01:29
VBoxGuestAdditions on MAC

Enabling Clipboard: VirtualBox Manager -> Settings -> General -> Advanced -> Shared Clipboard /Drag’n’Drop: bidirectional

Installing Guests Additions:

Enabling optical drive: VirtualBox Manager -> Settings -> Storage -> Controller Sata -> Adds optical Drive -> Leave Empty

Copy Guest Additions to the available folder on Mac: Finder -> Applications -> VirtualBox right click, Show Package Content -> Contents -> MacOS: copy VBoxGuestAdditions.iso somewhere to the folder

/* VT100 terminal reset (<ESC>c) */
console.log('\033c');
/* numbers comparations */
> '2' == 2
true
> '2' === 2
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active May 27, 2024 12:11
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>