Skip to content

Instantly share code, notes, and snippets.

@md5
md5 / 00_README.md
Last active May 17, 2024 16:36
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
@simonw
simonw / recover_source_code.md
Last active May 17, 2024 16:36
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@Apollounknowndev
Apollounknowndev / below_-55_no_lava.md
Created September 18, 2023 22:24
Below y-55 with no lava

In 1.18 there is a bug that forces lava to generate below either -55 or the sea level (whichever is lower), and the only ways to get around this up to this point required spamming features. This new method does not require this, and is 100% consistent.

The Holy Grail: Geodes

Geodes have interesting properties compared to other feature types.

  • Geodes can skip replacing certain blocks without the entire feature being terminated
  • Geodes dont have hardcoded checks like some other more restrictive features, the only check they do do is easily bypassed
  • The min/max distance from the center a geode generates is configurable (with min and max being separate fields)
  • Geodes can replace ALL blocks. Air, water, and lava included.
@n0mi1k
n0mi1k / ipagrabber.py
Last active May 17, 2024 16:34
.IPA file extracter for Apple Configurator
import os
import shutil
"""
Steps to retrieve the IPA file from the Configurator app:
1. Install Apple Configurator from the Mac App Store and sign in
2. Connect your iOS device to your Mac
3. Select "Add > Apps..." and search for the app you want to install, click "Add"
4. The newer Apple Configurator deletes the IPA after installing it, so you'll need to use this tool to grab it
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active May 17, 2024 16:34
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@fnky
fnky / ANSI.md
Last active May 17, 2024 16:33
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@mark-cooper
mark-cooper / OCLCCatcher.java
Created April 11, 2012 23:46
Batch edit ContentDM records using Catcher
package org.sonomalibrary.catcher;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;