Skip to content

Instantly share code, notes, and snippets.

@Battleroid
Battleroid / minecraft.conf
Created November 3, 2014 14:43
Supervisor conf for minecraft server
[program:a]
command=/usr/bin/java -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Xmx3840M -jar server.jar nogui
directory=/srv/minecraft/a
user=admin
group=minecraft
autostart=true
autorestart=true
stdout_logfile=/var/log/minecraft/a/stdout.log
stderr_logfile=/var/log/minecraft/a/stderr.log
@Battleroid
Battleroid / banner.php
Last active September 18, 2020 18:22
Banner script for TinyBoard. Works perfect.
<?php
$dir = "static/banners/";
$images = array();
if ($handle = scandir($dir)) {
foreach ($handle as $target) {
if (!in_array($target, [".", ".."])) {
$images[] = $target;
}
}
.homebrew/Cellar/figlet/2.2.5/share/figlet/fonts/3-d.flf
** ** **
/** // /**
******/** ** ******
**//// /****** /**///**/
//***** /**///**/** /**
/////**/** /**/** /**
****** /** /**/** //**
////// // // // //
.homebrew/Cellar/figlet/2.2.5/share/figlet/fonts/3x5.flf
user nginx;
worker_processes auto;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
Using events with 6144 elements
Warming up --------------------------------------
each 1.000 i/100ms
map 1.000 i/100ms
map + uniq 1.000 i/100ms
map + set 1.000 i/100ms
chunked by thread 1.000 i/100ms
chunked by thread 1.000 i/100ms
Calculating -------------------------------------
each 2.569 (± 3.7%) i/s - 26.000 in 10.237953s
@Battleroid
Battleroid / cat indices
Last active June 14, 2019 18:41
Sample run(s) with ILM changes
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open test-2019.06.14-000001 Uojm0KlsTN-MAIuCrypmjg 5 1 100 0 98.8kb 41.6kb
green open ghi-2019.06.14-000001 wnK2VzqDTnCs7yfBcfc84Q 5 1 100 0 124.8kb 49.6kb
green open def-2019.06.14-000001 C-wMZRCOT-GzasLJWecNpQ 5 1 100 0 138kb 56.3kb
green open abc-2019.06.14-000001 20q8O_8zTXKTgEfB_jrxoQ 5 1 100 0 118kb 49.6kb
diff --git a/src/SNode.java b/src/SNode.java
index fcd7775..0554a07 100644
--- a/src/SNode.java
+++ b/src/SNode.java
@@ -49,17 +49,15 @@ public class SNode implements Comparable<SNode> {
}
static public double distanceTo(SNode f, SNode t) {
- double dx = Math.abs(f.x - t.x);
- double dy = Math.abs(f.y- t.y);
M115 U3.6.0 ; tell printer latest fw version
M83 ; extruder relative mode
M104 S[first_layer_temperature] ; set extruder temp
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S[first_layer_temperature] ; wait for extruder temp
G28 W ; home all without mesh bed level
G80 ; mesh bed leveling
G1 Y-3.0 F1000.0 ; go outside print area
G92 E0.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import asyncio
import time
async def hello():
t = time.time()
print(f'Hello {t}')
return t