Skip to content

Instantly share code, notes, and snippets.

View matteing's full-sized avatar
🤠
hey

Sergio Mattei matteing

🤠
hey
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active May 6, 2024 11:47
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@thomaswitt
thomaswitt / instagram-media-rename.bash
Created May 24, 2022 11:59
Take an Instagram data export, use metadata from media.json file, rename pictures and add EXIF/IPTC date and title, so they're ready to import in a photo management application like iPhoto
#!/bin/bash
if [[ ! -s "media.json" ]]; then
echo "*** ERROR: No media.json file in current directory"
exit 1
fi
mkdir result
echo -n "Processing "
@tuco86
tuco86 / Dockerfile
Last active May 30, 2019 21:05
Build packages as wheels, then install in small container.
FROM python:3.7-slim-stretch AS build
RUN \
apt-get -q update \
&& apt-get -q install -y --no-install-recommends \
build-essential \
libssl-dev \
&& rm -rf /var/lib/apt/lists/* \
&& pip install -U pip
@joshnuss
joshnuss / udp_server.exs
Last active October 9, 2023 09:11
Fault tolerant UDP Server in Elixir
# to run:
# > elixir --no-halt udp_server.exs
# to test:
# > echo "hello world" | nc -u -w0 localhost 2052
# > echo "quit" | nc -u -w0 localhost 2052
# Let's call our module "UDPServer"
defmodule UDPServer do
# Our module is going to use the DSL (Domain Specific Language) for Gen(eric) Servers
use GenServer
from django.test import TestCase
from django.contrib import auth
class BaseAuthTestCase(TestCase):
def assertLoggedInAs(self, user):
client_user = auth.get_user(self.client)
self.assertEqual(client_user, user)
assert client_user.is_authenticated()
@ejdyksen
ejdyksen / patch-edid.md
Last active April 6, 2024 15:59
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):