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
#!/usr/bin/env bb | |
(ns oidc-client | |
"Get end-user access token from an OIDC provider, caching the access/refresh token in an encrypted file. Code in https://babashka.org | |
Usage: | |
/path/to/oidc_client.clj | |
When there are no cached, valid tokens, it will open a browser with the OIDC provider login URL and start a HTTPS-enabled | |
callback server on localhost. Make sure that the resulting redirect_uri is registered with your provider. | |
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
;; Copyright (c) James Reeves. All rights reserved. | |
;; The use and distribution terms for this software are covered by the Eclipse | |
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which | |
;; can be found in the file epl-v10.html at the root of this distribution. By | |
;; using this software in any fashion, you are agreeing to be bound by the | |
;; terms of this license. You must not remove this notice, or any other, from | |
;; this software. | |
(ns compojure.server.jetty | |
"Clojure interface to start an embedded Jetty server." |
This file has been truncated, but you can view the full file.
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
January 3, 2024 | |
VIA ECF | |
The Honorable Loretta A. Preska | |
District Court Judge | |
United States District Court | |
Southern District of New York | |
500 Pearl Street |
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
# create repository | |
git init | |
# status | |
git status | |
# add a remote called origin with url http://somegit.com/repo/myrepo.git | |
git remote add origin http://somegit.com/repo/myrepo.git | |
# stage files |
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
#!/usr/bin/env fish | |
# variant of the script making use of hw acceleration with nvidia gpu | |
set progname "generate_karaoke_vid_nvenc.fish"; | |
set audio_file $argv[1]; | |
set ass_file $argv[2]; | |
set bg_animation_file $argv[3]; | |
set output_file $argv[4]; |
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
(ns clipboard.core | |
(:require [fipp.edn :as fipp]) | |
(:import (java.awt.datatransfer DataFlavor Transferable StringSelection) | |
(java.awt Toolkit) | |
(java.io StringWriter)) | |
(defn get-clipboard | |
"get system clipboard" | |
[] | |
(-> (Toolkit/getDefaultToolkit) |
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
{:paths ["src" "resources" "cljs-src"] | |
:deps {org.clojure/clojure {:mvn/version "1.10.1"} | |
org.clojure/data.xml {:mvn/version "0.0.8"} | |
org.clojure/tools.reader {:mvn/version "1.3.2"} | |
org.clojure/tools.logging {:mvn/version "1.0.0"} | |
cheshire {:mvn/version "5.10.0"} | |
org.clojure/tools.cli {:mvn/version "1.0.194"} | |
ring/ring-core {:mvn/version "1.6.3"} | |
ring/ring-jetty-adapter {:mvn/version "1.6.3"} | |
ring/ring-json {:mvn/version "0.5.0"} |
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
({:id "96bedea1-a33e-4c45-878f-44a68556f22c", :events ({:text "Que", :offset 0, :id "07da39eb-dedc-4932-8d8d-ef91d71ca339", :type :lyrics-event} {:text " por", :offset 124.50500000000102, :id "d076fd58-09f1-4c7e-b77a-5d2a0766ce3c", :type :lyrics-event} {:text "que", :offset 278.04699999999866, :id "e4a28431-20c6-40f7-97bc-9a4309dddb5f", :type :lyrics-event} {:text "ría", :offset 414.3760000000002, :id "ccdda639-245e-4eb2-8bc8-4542a0da7eba", :type :lyrics-event} {:text " no", :offset 536.9840000000004, :id "461d11ce-8c77-41a2-bcd5-7cc6ce6893aa", :type :lyrics-event} {:text " lo ", :offset 786.8430000000008, :id "e650f774-040d-431a-9a0f-7d702578068b", :type :lyrics-event} {:text "po", :offset 1124.183000000001, :id "3b17949d-8cd6-4488-9748-a874db3d8321", :type :lyrics-event} {:text "des", :offset 1271.755000000001, :id "4245b7cb-aa94-4b83-97f8-8281e3c11a8d", :type :lyrics-event} {:text " creer", :offset 1499.4840000000004, :id "ea60d93c-4889-46e0-a937-73e5dcbe60c8", :type :lyrics-event} {:text "\nLos", :offset |
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
# first convert srt subs to .ass format | |
ffmpeg -i subs.srt subs.ass | |
# you may get encoding errors, in that case try adding option: -sub_charenc CP1252 | |
# render the subs | |
ffmpeg -i video.mkv -vf ass=subs.ass video_with_subs.mp4 |
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
#!/usr/bin/env fish | |
set AUDIO $argv[1] | |
echo input: $AUDIO | |
rm /tmp/salida.mpg | |
set BIRTH_T (date +%s%N) | |
cvlc $AUDIO & | |
set START_T (date +%s%N) |
NewerOlder