Skip to content

Instantly share code, notes, and snippets.

@kpe
kpe / $OpenAI-Whisper-Demo.md
Last active June 20, 2023 10:05
OpenAI Whisper Demo

OpeanAI Whisper Demo

If you have docker, try this:

cat <<EOF > /tmp/docker-init.sh
apt update && apt install python3-pip ffmpeg git -y
git clone https://gist.github.com/kpe/6a70395ce171ffee43d927eaf90b81b6 /tmp/whisper
cd /tmp/whisper
pip3 install -r requirements.txt
python3 -m whisper_demo
@cweinberger
cweinberger / mysql-drop-all-tables.sh
Created June 6, 2018 12:44
drops all tables of a specific db
#!/bin/bash
#usage: mysql-drop-all-tables -d database -u dbuser -p dbpass
TEMP_FILE_PATH='./drop_all_tables.sql'
while getopts d:u:p: option
do
case "${option}"
in
@guettli
guettli / ssh-tunnel@.service
Created December 22, 2017 11:40
Reliable persistent SSH-Tunnel via systemd (not autossh)
# Reliable persistent SSH-Tunnel via systemd (not autossh)
# https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service
[Unit]
Description=Tunnel for %i
After=network.target
[Service]
User=tunnel
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i
@douglasmiranda
douglasmiranda / core-os-install.md
Last active April 15, 2020 21:09
Installing CoreOS on my old laptop
@qffdn
qffdn / mpkdec.c
Created July 15, 2017 06:11
Microsoft/Windows product key decoder
/*
* Copyright (c) 2017 Donald Smith <qffdn@cock.li>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@soshial
soshial / template.xml
Last active June 1, 2018 12:26
ABBYY FineReader HotFolder template *.fta file
<?xml version="1.0"?>
<scenarios xmlns="http://www.abbyy.com/FineReader/Shell/TaskAutomation/0">
<scenario name="Моя задача111">
<operation operationType="UseBatch" mode="loadOptions" batchOrOptionsPath="" checkAfterExecute="false"
optionsMode="loadOptions">
<batchOptions xmlns="http://www.abbyy.com/FineReader/BatchOptions/0" hasLanguageDataBase="false">
<ocr options="OCRO_DetectTables,OCRO_DetectPictures" textType="STT_Normal" hilightLevel="SBEHL_Thorough"
patternName="(Default)" patternMode="UPM_DontUseUserPattern">
<language type="" languages="French,RussianOldSpelling"/>
</ocr>
@thacoon
thacoon / arch-linux-gnome-install
Last active June 24, 2024 10:31
Install a minimal gnome setup and some more useful things
# Install Gnome and some other useful thins
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# And based on https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger
# I have just copied commands from https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger#Weitere_notwendige_Dienste
# It's just to have it with one view after doing a [fresh installation](https://gist.github.com/thacoon/05d5a39606ab554455d6713e8a714b2c)
# Some useful services
pacman -S acpid ntp dbus cups cronie
Installed Packages
NetworkManager.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-libnm.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-tui.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-wifi.x86_64 1:1.0.6-27.el7 @anaconda
acl.x86_64 2.2.51-12.el7 @anaconda
aic94xx-firmware.noarch 30-6.el7 @anaconda
alsa-firmware.noarch 1.0.28-2.el7 @anaconda
alsa-lib.x86_64 1.0.28-2.el7 @anaconda
alsa-tools-firmware.x86_64 1.0.28-2.el7 @anaconda
@joepie91
joepie91 / .md
Last active March 17, 2023 18:42
Nix in multi-user mode on a non-NixOS (eg. Debian) system

This post is deprecated!

Its contents have been moved to the NixOS wiki here, where they are being kept up to date. Please follow the instructions there instead!

The original post is below for posterity.

 

 

Last updated: 2015-08-11

Searching for Files

Find mp3 in a directory that are multipart album but not in CD[0-9] folder

exiftool -partofset -directory -filename -r -if '$partofset =~ /^\d\/\d$$/ and $directory =~ /(?<!\d)$$/i and $filetype eq "MP3"' .

Find images in a directory that don't have a DateTimeOriginal