Skip to content

Instantly share code, notes, and snippets.

View achton's full-sized avatar

Achton Smidt Winther achton

  • Denmark
  • 06:56 (UTC +02:00)
View GitHub Profile
@achton
achton / gist:2c503cf31ef59c87bb3cb82427099552
Created April 6, 2020 13:00
Apply add-on to Linux Bedrock server
How to apply an add-on to a remote Linux-based Minecraft Bedrock server
=======================================================================
This was tested using unofficial Minecraft PE Linux Launcher (locally) and https://github.com/itzg/docker-minecraft-bedrock-server/ (remote)
Steps:
-----
1. Create add-on locally, e.g by following a tutorial (see below)
2. Apply and test with a local world (eg. using the unofficial Minecraft PE Linux Launcher)
3. Upload the minecraftWorlds/<worldname>/world_resource_packs.json to the root of the remote server
@achton
achton / fastlyMonthToDateBill.py
Last active January 18, 2023 20:53 — forked from themartorana/fastlyMonthToDateBill.py
Calculate your month-to-date bill from Fastly with the billing API
#!/usr/bin/env python3
# Requires Python 3
import requests
import locale
from typing import Dict, Tuple, List
from calendar import monthrange
from datetime import datetime
@achton
achton / es_result.json
Last active August 1, 2018 13:41
Elasticsearch result example for range data - see the "office_postal_from" and "office_postal_to" fields.
{
"took" : 26,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
@achton
achton / ESP_Blynk_RGB_LED_demo.ino
Last active July 8, 2021 17:24
This is a quick example of a NodeMCU ESP8266 connected to a WS2812 RGB LED. It uses the Blynk.cc Android app and the corresponding Blynk Iibrary to allow the LED to be controlled via a smartphone. It also uses the FastLED library to interface with the WS2812 RGB LED. See the demo video here: https://www.youtube.com/watch?v=Bb_ayiVslMg&start=0&au…
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "FastLED.h"
#define LED_PIN 4 // GPIO pin for RGB LEDs.
#define NUM_LEDS 1 // Number of LEDs connected.
#define BRIGHTNESS 64 // Default LED brightness.
#define LED_TYPE WS2812