Skip to content

Instantly share code, notes, and snippets.

View cr2007's full-sized avatar

CSK cr2007

  • ODeX Global
  • Dubai, United Arab Emirates
  • LinkedIn in/cskdev
View GitHub Profile

Apple developer documentation

developer.apple.com pages are rendered with JavaScript, so fetch them as Markdown instead. For /documentation pages, add .md to the URL (https://developer.apple.com/documentation/swiftui/view.md). For /design and /tutorials pages, also insert /tutorials/data before the path (https://developer.apple.com/tutorials/data/design/human-interface-guidelines/buttons.md). A few tutorial pages, such as overviews, have no Markdown version; for those, use .json in place of .md (https://developer.apple.com/tutorials/data/tutorials/swiftui.json).

@ravarcheon
ravarcheon / theHorse.js
Last active October 5, 2026 16:42
the horse that blocks your screen after a 2 minutes
// ==UserScript==
// @name the horse that stands in your way
// @namespace http://tampermonkey.net/
// @version 2026-03-01
// @description no more than 2 minutes of twitter. the first minute is a clear view, the second minute is where the horse slowly fades in. third minute and beyond there is nothing to see except horse
// @author You
// @match http://*.x.com/*
// @match https://*.x.com/*
// @match http://*.instagram.com/*
// @match https://*.instagram.com/*
@cr2007
cr2007 / sound_boost.md
Created January 29, 2026 15:00
Video Adjustable Hacks

Using the Web Audio API in the console, it is possible to boost the volume beyond 100%.

Standard volume controls are capped at 1.0 (100%), but this method creates a "virtual amplifier" for the audio stream.

Volume Boost

(function() {
    const video = document.querySelector('video');
 if (!video) return console.log("No video found. Try switching console context to the iframe.");
@aczw
aczw / update-content.yml
Last active September 13, 2026 20:06
GitHub Actions workflow for syncing Obsidian vault and Quartz (using Bun). Replace the placeholder values as necessary.
name: Update vault content
on:
schedule:
- cron: '0 11 * * MON' # Run every Monday at 11 AM UTC (6 AM EST, 7 AM EDT)
workflow_dispatch:
jobs:
update_vault_content:
runs-on: ubuntu-latest
@sarmadgulzar
sarmadgulzar / add_subtitles.py
Last active February 7, 2024 15:33
Launchpad Presentation
import cv2
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip
from moviepy.video.VideoClip import ImageClip, TextClip
img = cv2.imread("input.png")
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
vid = ImageClip(img)
frame_height = img.shape[0]
@cr2007
cr2007 / transcript.js
Created July 9, 2023 12:58
Extracting Microsoft Stream Transcripts
// Credit: https://www.rushworth.us/lisa/?p=6854
var objTranscriptionLines = window.angular.element(window.document.querySelectorAll('.transcript-list')).scope().$ctrl.transcriptLines;
var strRunningText = "";
for(var i = 0; i < objTranscriptionLines.length; i++){
if( objTranscriptionLines[i] ){
var strLineText = objTranscriptionLines[i].eventData.text;
strRunningText = strRunningText + "\n" + strLineText;
}
}
@bitsurgeon
bitsurgeon / youtube.md
Last active October 5, 2026 04:39
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active November 9, 2026 08:50
Conventional Commits Cheatsheet
@bmaupin
bmaupin / free-backend-hosting.md
Last active November 2, 2026 09:23
Free backend hosting
@bennylope
bennylope / ffmpeg-watermark.md
Created April 22, 2016 23:17 — forked from webkader/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.