Skip to content

Instantly share code, notes, and snippets.

@contre
contre / clang-update-alternatives.sh
Last active February 5, 2020 18:02
Update alternatives for multiple clang version
#!/bin/bash
# Remove all existing alternatives
sudo update-alternatives --remove-all llvm
sudo update-alternatives --remove-all clang
# exit on first error
set -e
declare -A versions
@contre
contre / gist:3034396
Created July 2, 2012 17:18
list of current backups
20120624D.tar.bz2
20120625D.tar.bz2
20120626D.tar.bz2
20120627D.tar.bz2
20120628D.tar.bz2
20120629D.tar.bz2
20120630-194301H.tar.bz2
20120630-222648H.tar.bz2
20120630-235648H.tar.bz2
20120630D.tar.bz2
@contre
contre / settings_exmaple.py
Created June 8, 2012 19:09
Custom Overlay Color
worlds["Exmaple"] = "exmaple"
lighting_spawn_overlay = [ClearBase(), EdgeLines(), SpawnOverlay(overlay_color=(0,0,255,255))]
lighting_slime_overlay = [ClearBase(), EdgeLines(), SlimeOverlay(overlay_color=(255,255,255,50))]
lighting_diamond_overlay = [ClearBase(), EdgeLines(), MineralOverlay(minerals=[(56, (32, 230, 220))])]
lighting_spawn_overlay_default = [ClearBase(), EdgeLines(), SpawnOverlay()]
lighting_slime_overlay_default = [ClearBase(), EdgeLines(), SlimeOverlay()]
renders["day"] = {
@contre
contre / gist:2890889
Created June 7, 2012 19:07
baked in overlay Config
worlds["Exmaple"] = "exmaple"
lighting_spawn_overlay = [ClearBase(), EdgeLines(), SpawnOverlay()]
lighting_spawn_overlay_baked = [Base(), EdgeLines(), SpawnOverlay()]
renders["day"] = {
"world": "Exmaple",
"title": "Daytime",
"rendermode": lighting,
"dimension": "overworld",
@contre
contre / gist:2770914
Created May 22, 2012 18:53
After running test builder
2012-05-22 11:53:30,026 - Builder - DEBUG - making temp_area: /tmp/mco_build_tempE4Ezba
2012-05-22 11:53:30,027 - Builder - INFO - running command [clone]
2012-05-22 11:53:37,159 - Builder - INFO - Cloned.
2012-05-22 11:53:37,160 - Builder - INFO - running command [checkout]
2012-05-22 11:53:37,206 - Builder - INFO - running command [build build]
2012-05-22 11:53:44,646 - Builder - INFO - running command [profile]
2012-05-22 11:53:45,260 - Builder - INFO - running command [convert]
2012-05-22 11:53:45,916 - Builder - INFO - running command [render]
2012-05-22 11:53:47,410 - Builder - DEBUG - deleting temp_area: /tmp/mco_build_tempE4Ezba
-bash: building: command not found
@contre
contre / gist:2770512
Created May 22, 2012 17:40
Exmaple Overviewer Config
worlds["Exmaple"] = "exmaple"
renders["day"] = {
"world": "Exmaple",
"title": "Daytime",
"rendermode": lighting,
"dimension": "overworld",
"northdirection": "upper-left",
}
@contre
contre / gist:2764280
Created May 21, 2012 19:55
Generating profile images
# Code taken from http://code.google.com/p/jrfonseca/wiki/Gprof2Dot
python -m cProfile -o output.pstats ./overviewer.py --config=settings_exmaple.py
./gprof2dot.py -f pstats output.pstats | dot -Tpng -o output.png
@contre
contre / GitLog
Created May 1, 2012 20:36
I have no idea what I'm doing
* commit 239d2885bafc83b6f73af0d804dc2443c770b5f1 7d9592a3a0bad696ebb4267ff32ba4c81b894bca d747aca7f858798df20cef914ea00eb1c72597a9
|\ Merge: 7d9592a d747aca
| | Author: Richard Pastrick <rpastric@contre.us>
| | Date: Tue May 1 13:27:30 2012 -0700
| |
| | Merge branch 'devel' of github.com:contre/Minecraft-Overviewer into devel
| |
| * commit d747aca7f858798df20cef914ea00eb1c72597a9 07bd9e4d3696c58caa3cf793210d793ae4854d07
| | Author: Richard Pastrick <rpastric@contre.us>
| | Date: Tue May 1 13:23:37 2012 -0700
@contre
contre / gist:2510193
Created April 27, 2012 15:32
issue 707 fix
var curTset = curWorld.get("tileSets").at(0);
var spawn = curTset.get("spawn");
if(spawn) {
var mapcenter = overviewer.util.fromWorldToLatLng(
spawn[0],
spawn[1],
spawn[2],
curTset);
}