Skip to content

Instantly share code, notes, and snippets.

View AugustKarlstedt's full-sized avatar
☮️

August Karlstedt AugustKarlstedt

☮️
View GitHub Profile
pdftoppm -png -r 300 "whatever.pdf" "directory/filenameprefix"
@AugustKarlstedt
AugustKarlstedt / update.sh
Created April 30, 2019 18:46
update all outdated python packages
pip3 list --outdated | awk '{print $1}' | tail -n +3 | xargs pip3 install -U
// Cognitive Service containers don't currently handle Cross-origin resource sharing (CORS) headers. This means that for user agents
// that enforce CORS (browsers, typically), requests will fail. The following code is an example of how you might work around this,
// temporarily, until the containers are fixed. This code is provided as-is, with no guarantees.
//
// The following is a modified version of code found here: https://github.com/ccoenraets/cors-proxy.
var express = require('express'),
request = require('request'),
bodyParser = require('body-parser'),
app = express();
@AugustKarlstedt
AugustKarlstedt / Dockerfile
Created November 2, 2018 18:56 — forked from gyndav/Dockerfile
install Scala and sbt on Alpine Linux
FROM openjdk:8u151-jre-alpine
ENV SCALA_VERSION=2.12.4 \
SCALA_HOME=/usr/share/scala
# NOTE: bash is used by scala/scalac scripts, and it cannot be easily replaced with ash.
RUN apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
apk add --no-cache bash curl jq && \
cd "/tmp" && \
wget --no-verbose "https://downloads.typesafe.com/scala/${SCALA_VERSION}/scala-${SCALA_VERSION}.tgz" && \
@AugustKarlstedt
AugustKarlstedt / instructions.md
Created September 25, 2018 01:56
Enabled HTTPS in WordPress Docker Container

Originally posted by @ajdruff at docker-library/wordpress#46 (comment)

  1. expose port 443 by adding the following to your compose file:

      ports:
        - "443:443"       
    
  2. restart your container (be sure your db and web files are on persistent storage!)

@AugustKarlstedt
AugustKarlstedt / userscript.js
Created September 10, 2018 02:02
YouTube Speech Audio Filter (TamperMonkey UserScript)
// ==UserScript==
// @name YouTube Speech Audio Filter
// @namespace NONE
// @version 1.0
// @description I wrote this because of background noise in Rachel Thomas's Computational Linear Algebra series, but it probably could be used elsewhere.
// @author August Karlstedt
// @match https://www.youtube.com/watch?v=*
// @grant none
// @run-at document-end
// ==/UserScript==