Skip to content

Instantly share code, notes, and snippets.

View spookyuser's full-sized avatar
🌎
reading and writing

spookyuser

🌎
reading and writing
View GitHub Profile
@spookyuser
spookyuser / Dockerfile
Created October 3, 2022 10:06
Baking sentence transformers into docker
FROM python:3.10.7-slim as base
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
PIPENV_NOSPIN=true \
NUMBA_CACHE_DIR=/tmp \
@spookyuser
spookyuser / ThisWorkbook.bas
Last active January 23, 2023 06:19
A combination of 2 super cool vba scripts that, together, allow you to distribute a simple button enabled excel macro without an installer
' All code comes from the following places:
' - https://stackoverflow.com/a/41546218/1649917
' - https://www.ozgrid.com/VBA/excel-add-in-create.htm
Option Explicit
Dim cControl As CommandBarButton
' Set it to True to be able to Debug install mechanism
Const bVerboseMessages = False
' Will be use to verify if the procedure has already been run
@spookyuser
spookyuser / install_ffmpeg.sh
Last active December 28, 2019 07:07 — forked from loong/Install ffmpeg on AWS Linux AMI
Installs FFmpeg on aws\whatever
# Taken from https://forums.aws.amazon.com/thread.jspa?messageID=332091
# And https://gist.github.com/rainabba/07425c3bc14a0bb51632f12e913d9081
#
# Usage: `sudo bash ./install_ffmpeg.sh`
# Config Variables
static_host=https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
filename=ffmpeg-git-64bit-static.tar.xz
@spookyuser
spookyuser / AddCookiesInterceptor.kt
Last active July 16, 2017 22:27 — forked from nikhiljha/AddCookiesInterceptor.java
Retrofit2/OkHttp3 Cookies (Drag and Drop, One Size Fits 99%)
import android.content.SharedPreferences
import okhttp3.Interceptor
import okhttp3.Response
import org.threeten.bp.Instant
import timber.log.Timber
import java.io.IOException
import java.util.*
import javax.inject.Inject
/**