Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active July 23, 2024 17:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@jonathanstark
jonathanstark / verify-google-recaptcha-with-php
Last active July 16, 2024 17:06
Verify Google reCAPTCHA with PHP
#
# Verify captcha
$post_data = http_build_query(
array(
'secret' => CAPTCHA_SECRET,
'response' => $_POST['g-recaptcha-response'],
'remoteip' => $_SERVER['REMOTE_ADDR']
)
);
$opts = array('http' =>
@xerpi
xerpi / 3DS_Linux_build_instructions.md
Last active March 27, 2024 12:02
3DS Linux build instructions

Step 1: Compiling or Downloading the toolchain

Step 1.a: If you choose to download a pre-compiled toolchain (only for Linux x86-64)

  • Go to https://toolchains.bootlin.com
  • Select arch: armv6-eabihf
  • Select libc: glibc
  • Download bleeding-edge
  • Uncompress it (for example to /opt)
  • Add the bin/directory of the toolchain to $PATH
  • In my case: export PATH=$PATH:/opt/armv6-eabihf--glibc--bleeding-edge-2020.08-1
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 23, 2024 19:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@williewillus
williewillus / primer.md
Last active April 22, 2024 15:29
1.13/1.14 update primer

This primer is licensed under CC0, do whatever you want.

BUT do note that this can be updated, so leave a link here so readers can see the updated information themselves.

1.13 and 1.14 are lumped together in this doc, you're on your own if you just want to go to 1.13 and not 1.14, for some reason.

1.15 stuff: https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e

Things in Advance

  • ResourceLocation now throw on non-snake-case names instead of silently lowercasing for you, so you probably should go and change all those string constants now. More precisely, domains must only contain alphanumeric lowercase, underscore (_), dash (-), or dot (.). Paths have the same restrictions, but can also contain forward slashes (/).
@7coil
7coil / application.js
Created January 24, 2019 01:28
This application turns numbered pictures in a `frames` folder into the `project` folder as hashed files, and creates the corresponding JSON to insert into the project.
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const compare = (a, b) => parseInt(a.replace(/\D/g, ''), 10) - parseInt(b.replace(/\D/g, ''), 10);
const data = fs.readdirSync('./frames')
.sort(compare)
.map((file, index) => {
const hash = crypto.createHash('md5').update(fs.readFileSync(`./frames/${file}`)).digest('hex');
@quat1024
quat1024 / we out here reloadin.md
Last active January 19, 2020 11:42
Probably Very Wrong Overview of Resource Reloading in 1.14.4/Fabric

TL;DR

If you want to load some resources or data in Fabric 1.14 or 1.15, do this:

ResourceManagerHelper.get(ResourceType.ASSETS).registerReloadListener(new SimpleResourceReloadListener<MyResource>() {
  @Override
  public Identifier getFabricId() {
    return new Identifier("some_identifier", "that_describes_this_task");
  }
@quat1024
quat1024 / fix it.md
Last active February 23, 2021 07:23
Fix stuff being broke in IntelliJ.

What

When compiling mods in recent versions of IntelliJ, weird things start happening:

  • With ForgeGradle 2 (1.12-), none of the assets show up in-game (language keys, models, textures etc)
  • Broken hotswapping.
  • Potentially other Bad, Terrible Things that are yet to be discovered.

How

@quat1024
quat1024 / mod mod things.md
Last active January 21, 2023 04:10
Minecraft Modding Resources