Skip to content

Instantly share code, notes, and snippets.

View petzel's full-sized avatar
💭
🗺💻🏍🎣🍺

Eric Petzel petzel

💭
🗺💻🏍🎣🍺
  • San Francisco, CA
View GitHub Profile
@npearce
npearce / install-docker.md
Last active May 28, 2024 20:22
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@typebrook
typebrook / MBTilesServer.kt
Last active January 12, 2024 08:46
How to make MBTiles valid on Mapbox Android SDK #mbtiles #android #mapbox
package com.example.sample.offline
import android.util.Log
import java.io.BufferedReader
import java.io.ByteArrayOutputStream
import java.io.FileNotFoundException
import java.io.PrintStream
import java.net.ServerSocket
import java.net.Socket
import kotlin.math.pow
@blaylockbk
blaylockbk / multipro_template.py
Last active May 20, 2024 16:39
Template for Python multiprocessing and multithreading
import multiprocessing
from multiprocessing.dummy import Pool as ThreadPool
import numpy as np
def my_multipro(items, func, max_cpus=12):
"""Do an embarrassingly parallel task using multiprocessing.
Use this for CPU bound tasks.