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
| // A Color Slider that is similar to one in | |
| // iOS 18+ when configuring a tinted Home Screen | |
| // Full video-walktrough on building this component: https://youtu.be/VFVyN5hNW24 | |
| import SwiftUI | |
| fileprivate let SLIDER_HEIGHT = 34.0 | |
| fileprivate let KNOB_DIAMETER = SLIDER_HEIGHT + 4.0 | |
| struct ColorSlider: View { |
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 { useEffect, useState } from "react"; | |
| type UseTextSelectionReturn = { | |
| text: string; | |
| rects: DOMRect[]; | |
| ranges: Range[]; | |
| selection: Selection | null; | |
| }; | |
| const getRangesFromSelection = (selection: Selection): Range[] => { |
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
| // | |
| // ContentView.swift | |
| // AppleMusicLyricsPlayer | |
| // | |
| // Created by Magesh Sridhar on 2/5/23. | |
| // | |
| import SwiftUI | |
| import AVKit |
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
| # ffmpeg -i foo.m4a foo.wav | |
| from pyannote.audio import Pipeline | |
| pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization") | |
| diarization = pipeline("foo.wav") | |
| # RTTM format https://catalog.ldc.upenn.edu/docs/LDC2004T12/RTTM-format-v13.pdf | |
| with open("foo.rttm", "w") as rttm: | |
| diarization.write_rttm(rttm) |
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
| /* | |
| RUN THE SCRIPT BY YOURSELF: | |
| - Run `node paddle-revenue.js` on your server and let it run 24/7. | |
| - Access the API at http://your_server_ip:8175/ (JSON) | |
| HOSTED VERSION: | |
| If you don't want to run the script by your own, you can use the | |
| hosted version. The price is $5 per month per Paddle account. | |
| Here is how: |
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
| # how to run this thingy | |
| # create a file on your mac called setup.sh | |
| # run it from terminal with: sh setup.sh | |
| # heavily inspired by https://twitter.com/damcclean | |
| # https://github.com/damcclean/dotfiles/blob/master/install.sh | |
| # faster dock hiding/showing (run in terminal) | |
| # defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock |
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
| var debug = process.env.NODE_ENV !== "production"; | |
| var webpack = require('webpack'); | |
| module.exports = { | |
| context: __dirname, | |
| devtool: debug ? "inline-sourcemap" : null, | |
| entry: "./js/scripts.js", | |
| output: { | |
| path: __dirname + "/js", | |
| filename: "scripts.min.js" |
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
| #!/bin/bash | |
| # git-cleanup-repo | |
| # | |
| # Author: Rob Miller <rob@bigfish.co.uk> | |
| # Adapted from the original by Yorick Sijsling | |
| git checkout master &> /dev/null | |
| # Make sure we're working with the most up-to-date version of master. | |
| git fetch |