git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| """ | |
| A file lock implementation that tries to avoid platform specific | |
| issues. It is inspired by a whole bunch of different implementations | |
| listed below. | |
| - https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py | |
| - http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup | |
| - http://stackoverflow.com/questions/489861/locking-a-file-in-python | |
| - http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/ | |
| - http://packages.python.org/lockfile/lockfile.html |
| #!/usr/local/bin/python | |
| from pyPdf import PdfFileWriter, PdfFileReader | |
| import random | |
| from pprint import pprint as pp | |
| import sys | |
| # sys.setrecursionlimit(10000000) | |
| seed = 'BN9F' | |
| pile = [1] | |
| def getNumber(): |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleDevelopmentRegion</key> <string>en</string> | |
| <key>CFBundleName</key> <string>MinecraftLauncher</string> | |
| <key>CFBundleVersion</key> <string>1.0.1</string> | |
| <key>CFBundleShortVersionString</key> <string>MinecraftLauncher 1.0.1</string> | |
| <key>CFBundleExecutable</key> <string>LaunchGame</string> | |
| <key>CFBundlePackageType</key> <string>APPL</string> |
| #!/usr/bin/env python | |
| """ | |
| Python functions for finding open files and PIDs that have opened a file. | |
| """ | |
| import numbers | |
| import subprocess | |
| try: |
Tracks down when a Minecraft account was created.
Mojang has an API endpoint for usernames:
https://api.mojang.com/users/profiles/minecraft/<name>?at=<timestamp>
It can be used to find the UUID of an account, by username it used at the given time.
It returns either 200 OK or 204 No Content – indicating that the username was not in use at the time.
| #!/usr/bin/env python3 | |
| import asyncio | |
| from vpn import get_proxy | |
| proxy = port = auth = None | |
| pool = asyncio.Queue(5) | |
| psize = 0 | |
| async def process_client(client_reader, client_writer, *, CHUNK=4096): | |
| global psize |
It's possible to use create an MCP installation for versions of Minecraft where there hasn't been a full MCP release. It takes a little bit of manual setup, but the end result is highly useful.
Download and extract the most recent MCP build from http://www.modcoderpack.com/. (Currently, the latest build is http://www.modcoderpack.com/files/mcp940.zip)
Edit version.cfg in the conf folder, and change ClientVersion and ServerVersion to the version you want (for instance, 1.12.2).
Download the SRG zip for the version you want; these can generally be found at http://mcpbot.bspk.rs/mcp/<version>/mcp-<version>-srg.zip (for example, http://mcpbot.bspk.rs/mcp/1.11.2/mcp-1.11.2-srg.zip) or at http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/<version>/mcp-<version>-srg.zip (for example, http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip). (For 1.12.1 and 1.12.2, only the minecraftforge link works)
Extract that zip into the MCP conf folder, over
| var net = require('net'); | |
| // creates the server | |
| var server = net.createServer(); | |
| //emitted when server closes ...not emitted until all connections closes. | |
| server.on('close',function(){ | |
| console.log('Server closed !'); | |
| }); |