Skip to content

Instantly share code, notes, and snippets.

@burntcookie90
burntcookie90 / proguard.cfg
Created April 8, 2014 18:42
Proguard for use with junit, gson and guava
##---------------Begin: proguard configuration common for all Android apps ----------
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
-dump class_files.txt
-printseeds seeds.txt
-printusage unused.txt
@corny
corny / unifi-backup.sh
Last active January 26, 2024 02:07
Improved backup script for Ubiquiti UniFi controller
#!/bin/bash -e
#
# Improved backup script for Ubiquiti UniFi controller
# original source: http://wiki.ubnt.com/UniFi#Automated_Backup
#
# must contain:
# username=<username>
# password=<password>
source ~/.unifi-backup
@diatche
diatche / transcribe.py
Last active May 30, 2024 08:11
Audio Transcriber using OpenAI Whisper
import argparse
import subprocess
import os
import math
from openai import OpenAI
MAX_SIZE = 26214400 # Maximum file size (in bytes)
# Parse command line arguments
parser = argparse.ArgumentParser(
@diatche
diatche / ollama-langchain.py
Last active May 30, 2024 08:09
Ask a URL using Llama 2 running locally
# Ask questions about a document using Ollama and Langchain.
# This leverages a local LLM to provide insights into any document.
# It's far from perfect, as it's power is limited by the LLM size.
# It leverages the langchain library to perform tasks like document loading,
# text splitting, embedding generation, and using the Ollama client for generating answers.
# You need to have Ollama installed (with model llama2:13b available). See https://github.com/jmorganca/ollama
# Usage: