This file contains 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 | |
# Define the Whisper function | |
whisp() { | |
source ~/extras/venv/bin/activate # ymmv, this is my "userspace" requirement | |
whisper --model medium.en --output_format=all $@ #pip3 install openai-whisper to get this | |
} | |
# Get the sink input index for 'telegram-desktop' | |
sink_input_index=$(pactl list short | grep 'telegram-desktop' | cut -f1|head -n1 ) |
This file contains 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
x=$(kf5-config --path services|cut -f1 -d:)&&mkdir -p $x/ServiceMenus&&pushd $x/ServiceMenus&& | |
cat <<EOF | |
[Desktop Entry] | |
Type=Service | |
ServiceTypes=all/allfiles | |
MimeType=all/all; | |
Actions=CompressZstd | |
X-KDE-Priority=TopLevel | |
X-KDE-Submenu=7-Zip |
This file contains 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
cfg=( | |
--bootloader=grub2 | |
--no-mrproper | |
--no-clean | |
--makeopts=-j8 | |
--no-firmware | |
--no-busybox | |
--no-keymap |
This file contains 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 | |
set -x | |
#built and tested against clion default formatted c ymmv | |
sed --in-place --regexp-extended\ | |
-e 's,for\s*\((\w+\s+)(\w+)\s*=\s*(\w+)\;\s*\2.*<([^;]+)\;.*(\2?(\+\+)\2?).*\),for (\2/*as \1*/ in \3 until \4),'\ | |
-e 's,for\s*\((\w+)\s*=\s*(\w+)\;\s*\1.*<([^;]+)\;.*(\1?(\+\+)\1?).*\),for (\1 in \2 until \3),'\ | |
-e 's,^\s*void\s*(\w+)\s*(\(.*\))\s*\{\s*$,fun \1\2:Unit{,'\ | |
-e 's,^\s*(\w+_t)\s*(\w+)\s*(\(.*\))\s*\{\s*$,fun \2\3:\1{,'\ |
This file contains 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
/** | |
* Numerically re-prioritizable reference. | |
* Repurposes SoftReference.timestamp field as a priority value. | |
* <p> | |
* Intended to re-use all SoftReference-related VM features | |
* except its time-as-priority behavior. | |
* | |
* TODO this requires some modifications to internal JVM GC behavior. |
This file contains 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
package sample | |
import kotlinx.cinterop.* | |
import platform.linux.inet_ntoa | |
import platform.posix.* | |
/** | |
* | |
*/ |
This file contains 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 java.lang.reflect.Field; | |
import sun.misc.Unsafe; | |
public class Test { | |
private static final int N = 128 * 1024 * 1024; | |
public static void main(String[] args) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { | |
{ | |
Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe"); |
This file contains 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
@DslMarker | |
annotation class JSBuilderDsl | |
@DslMarker | |
annotation class JSSetterDsl | |
data class JSObj(val map: MutableMap<String, Any?> = linkedMapOf()) : MutableMap<String, Any?> by map { | |
object Arr { | |
@JSBuilderDsl |
This file contains 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
package com.fnreport.org.bereft | |
import com.binance.api.client.BinanceApiClientFactory | |
import vec.util.logDebug | |
import java.io.FileWriter | |
import java.util.* | |
/** | |
* maybe this is two classes? or maybe it's just a rarely used loop filter thing that needs no more attention. | |
*/ |
NewerOlder