Browse Source

latest

master
Jeffrey Paul 11 months ago
parent
commit
e50f689576
15 changed files with 1120 additions and 41 deletions
  1. +1
    -1
      bin/detachsign-file
  2. +39
    -0
      bin/encrypt-for-sneak-ascii
  3. +0
    -10
      bin/unlock-las1
  4. +0
    -10
      bin/unlock-syncpi-alpha
  5. +0
    -10
      bin/unlock-syncpi-bravo
  6. +0
    -10
      bin/unlock-syncpi-las2
  7. +11
    -0
      homedir.makefile/Makefile
  8. +37
    -0
      osmstatic/index.html
  9. +162
    -0
      osmstatic/leaflet-hash.js
  10. +635
    -0
      osmstatic/leaflet.css
  11. +5
    -0
      osmstatic/leaflet.js
  12. +4
    -0
      osxbackup/rsyncbackup.command
  13. +25
    -0
      ubuntu-makevm/Makefile
  14. +16
    -0
      ubuntu-makevm/install.sh
  15. +185
    -0
      ubuntu-makevm/preseed.cfg

+ 1
- 1
bin/detachsign-file View File

@@ -2,4 +2,4 @@

SNEAK_KEY_ID="5539AD00DE4C42F3AFE11575052443F4DF2A55C2"

gpg -u $SNEAK_KEY_ID -a --detach-sig $*
gpg -u $SNEAK_KEY_ID -a --detach-sig "$*"

+ 39
- 0
bin/encrypt-for-sneak-ascii View File

@@ -0,0 +1,39 @@
#!/bin/bash

set -x

KEYSERVER="hkps.pool.sks-keyservers.net"
#KEYSERVER="pgp.mit.edu"

KEYS=""
KEYS+=" 5539AD00DE4C42F3AFE11575052443F4DF2A55C2" #sneak@sneak.berlin
KEYS+=" FF2530A4F3F152E8865FC17CA833B7CE3F2CC6FC" #JP Yubi 6192
KEYS+=" 078BBD04FBE35D665180EF8A476509F749BFD1AD" #JP Yubi 2811
KEYS+=" 7D1123A022FC90DF389EC65F233196C180B1C28F" #JP Yubi 6643
KEYS+=" F5A3A83B9E65EA3E1A2A48E5FDA763BDDCFAB8AC" #Yubikey 4928206 20160927
KEYS+=" B044B27DCB86641AFE3AB274779D07C54EB7CF85" #Yubikey 4953582 20160927
#KEYS+=" 3FF8DE63855070F8B9CB0D9A67B4CD26470681DA" #Yubikey 4CNano 06931602 20171018

KEYS+=" 1CA168D7E842DFD1745815006F291E6D9AA87738"
KEYS+=" 726D577AFB82E64049B62A8DA763B92AD841A706" # Yubi 7192344 20180613 pris
KEYS+=" 04630E42D244BC80717D28D51280F730A9AD633C"
KEYS+=" 5D48805E38B8C2E04103C7728CBD64834BC043EA"
KEYS+=" 8904EE6400E7B7409CE00AA92084C4563F360B45"
KEYS+=" FE65DB157D8BF9E4FEDF50DA927353E2C4507A5B"
KEYS+=" 27CF8E00190D7AF340D8AE55A6C1C5C2083CB579"

GARGS=""
GARGS+=" -a"
GARGS+=" --trust-model always"
#GARGS+=" --compress-algo bzip2"
GARGS+=" --compress-algo none"
#GARGS+=" --bzip2-compress-level 9"

for KEY in $KEYS ; do
if ! gpg --list-key $KEY 2>&1 > /dev/null ; then
gpg --recv-key --keyserver $KEYSERVER $KEY
fi
GARGS+=" -r $KEY"
done

gpg $GARGS --encrypt "$*"

+ 0
- 10
bin/unlock-las1 View File

@@ -1,10 +0,0 @@
#!/bin/bash

KEYFILE="$HOME/Documents/sync/secrets/luks/las1.eeqj.de.luks.txt.gpg"

if [[ ! -e "$KEYFILE" ]]; then
echo "wrong box!" >> /dev/stderr
exit 1
fi

gpg -d "$KEYFILE" | ssh root@las1.local "bash /root/unlock_disks"

+ 0
- 10
bin/unlock-syncpi-alpha View File

@@ -1,10 +0,0 @@
#!/bin/bash

KEYFILE="$HOME/Documents/sync/secrets/luks/syncpi-las1-alpha.luks.gpg"

if [[ ! -e "$KEYFILE" ]]; then
echo "wrong box!" >> /dev/stderr
exit 1
fi

gpg -d "$KEYFILE" | ssh root@syncpi-las1-alpha.local "bash /root/unlock_disks"

+ 0
- 10
bin/unlock-syncpi-bravo View File

@@ -1,10 +0,0 @@
#!/bin/bash

KEYFILE="$HOME/Documents/sync/secrets/luks/syncpi-las1-bravo.luks.gpg"

if [[ ! -e "$KEYFILE" ]]; then
echo "wrong box!" >> /dev/stderr
exit 1
fi

gpg -d "$KEYFILE" | ssh root@syncpi-las1-bravo.local "bash /root/unlock_disks"

+ 0
- 10
bin/unlock-syncpi-las2 View File

@@ -1,10 +0,0 @@
#!/bin/bash

KEYFILE="$HOME/Documents/sync/secrets/luks/syncpi-las2.luks.txt.gpg"

if [[ ! -e "$KEYFILE" ]]; then
echo "wrong box!" >> /dev/stderr
exit 1
fi

gpg -d "$KEYFILE" | ssh root@syncpi-las2.tor "bash /root/unlock_disks"

+ 11
- 0
homedir.makefile/Makefile View File

@@ -3,6 +3,8 @@ JUNKFILES += .gdb_history .mysql_history .sqlite_history
BREWPACKAGES := mosh duplicity pv offlineimap wget nmap tor torsocks
YYYYMM := $(shell date +%Y%m)

HACKSREPO := ~/.paths/sneak-scratch/dev/hacks/

NO_COLOR = \033[0m
O1_COLOR = \033[0;01m
O2_COLOR = \033[32;01m
@@ -79,3 +81,12 @@ remotebackup:

packages:
brew install $(BREWPACKAGES)

# this copies instead of linking because the 'hacks' repo is part of the
# sneak-sync shared folder which is synced with machines off-prem
# and they are not allowed impending RCE on workstations

update:
cat $(HACKSREPO)/homedir.makefile/Makefile > Makefile
brew upgrade


+ 37
- 0
osmstatic/index.html View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html style="height:100%;margin:0;padding:0;">

<!--

setup per
https://switch2osm.org/serving-tiles/using-a-docker-container/


-->
<title>map</title>
<meta charset="utf-8">
<link rel="stylesheet" href="./leaflet.css" />
<script src="./leaflet.js"></script>
<script src="./leaflet-hash.js"></script>
<style type="text/css">
.leaflet-tile-container { pointer-events: auto; }
</style>
</head>
<body style="height:100%;margin:0;padding:0;">
<div id="map" style="height:100%"></div>
<script>
//<![CDATA[

var tileserver = 'http://127.0.0.1';

var map = L.map('map').setView([40.36629, 49.83335], 18);

L.tileLayer(tileserver + '/tile/{z}/{x}/{y}.png', {
attribution: 'OSM'
}).addTo(map);

var hash = L.hash(map)
//]]>
</script>
</body>
</html>

+ 162
- 0
osmstatic/leaflet-hash.js View File

@@ -0,0 +1,162 @@
(function(window) {
var HAS_HASHCHANGE = (function() {
var doc_mode = window.documentMode;
return ('onhashchange' in window) &&
(doc_mode === undefined || doc_mode > 7);
})();

L.Hash = function(map) {
this.onHashChange = L.Util.bind(this.onHashChange, this);

if (map) {
this.init(map);
}
};

L.Hash.parseHash = function(hash) {
if(hash.indexOf('#') === 0) {
hash = hash.substr(1);
}
var args = hash.split("/");
if (args.length == 3) {
var zoom = parseInt(args[0], 10),
lat = parseFloat(args[1]),
lon = parseFloat(args[2]);
if (isNaN(zoom) || isNaN(lat) || isNaN(lon)) {
return false;
} else {
return {
center: new L.LatLng(lat, lon),
zoom: zoom
};
}
} else {
return false;
}
};

L.Hash.formatHash = function(map) {
var center = map.getCenter(),
zoom = map.getZoom(),
precision = Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2));

return "#" + [zoom,
center.lat.toFixed(precision),
center.lng.toFixed(precision)
].join("/");
},

L.Hash.prototype = {
map: null,
lastHash: null,

parseHash: L.Hash.parseHash,
formatHash: L.Hash.formatHash,

init: function(map) {
this.map = map;

// reset the hash
this.lastHash = null;
this.onHashChange();

if (!this.isListening) {
this.startListening();
}
},

removeFrom: function(map) {
if (this.changeTimeout) {
clearTimeout(this.changeTimeout);
}

if (this.isListening) {
this.stopListening();
}

this.map = null;
},

onMapMove: function() {
// bail if we're moving the map (updating from a hash),
// or if the map is not yet loaded

if (this.movingMap || !this.map._loaded) {
return false;
}

var hash = this.formatHash(this.map);
if (this.lastHash != hash) {
location.replace(hash);
this.lastHash = hash;
}
},

movingMap: false,
update: function() {
var hash = location.hash;
if (hash === this.lastHash) {
return;
}
var parsed = this.parseHash(hash);
if (parsed) {
this.movingMap = true;

this.map.setView(parsed.center, parsed.zoom);

this.movingMap = false;
} else {
this.onMapMove(this.map);
}
},

// defer hash change updates every 100ms
changeDefer: 100,
changeTimeout: null,
onHashChange: function() {
// throttle calls to update() so that they only happen every
// `changeDefer` ms
if (!this.changeTimeout) {
var that = this;
this.changeTimeout = setTimeout(function() {
that.update();
that.changeTimeout = null;
}, this.changeDefer);
}
},

isListening: false,
hashChangeInterval: null,
startListening: function() {
this.map.on("moveend", this.onMapMove, this);

if (HAS_HASHCHANGE) {
L.DomEvent.addListener(window, "hashchange", this.onHashChange);
} else {
clearInterval(this.hashChangeInterval);
this.hashChangeInterval = setInterval(this.onHashChange, 50);
}
this.isListening = true;
},

stopListening: function() {
this.map.off("moveend", this.onMapMove, this);

if (HAS_HASHCHANGE) {
L.DomEvent.removeListener(window, "hashchange", this.onHashChange);
} else {
clearInterval(this.hashChangeInterval);
}
this.isListening = false;
}
};
L.hash = function(map) {
return new L.Hash(map);
};
L.Map.prototype.addHash = function() {
this._hash = L.hash(this);
};
L.Map.prototype.removeHash = function() {
this._hash.removeFrom();
};
})(window);

+ 635
- 0
osmstatic/leaflet.css View File

@@ -0,0 +1,635 @@
/* required styles */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline: 0;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
}
/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a,
.leaflet-bar a:hover {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path {
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.7);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover {
text-decoration: underline;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font-size: 11px;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
background: rgba(255, 255, 255, 0.5);
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 19px;
line-height: 1.4;
}
.leaflet-popup-content p {
margin: 18px 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
padding: 4px 4px 0 0;
border: none;
text-align: center;
width: 18px;
height: 14px;
font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
}
.leaflet-popup-scrolled {
overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-popup-tip-container {
margin-top: -1px;
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-clickable {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}

+ 5
- 0
osmstatic/leaflet.js
File diff suppressed because it is too large
View File


+ 4
- 0
osxbackup/rsyncbackup.command View File

@@ -21,6 +21,9 @@ RSYNC_SKIP_COMPRESS+="/sfx/sr2/srf/svgz/t[gb]z/tlz/txz/vob/wim/wma/wmv/xz/zip"

RSYNC="rsync"
RSYNC_TRY="$HOME/Library/Homebrew/bin/rsync"
if which brew >/dev/null 2>&1 ; then
RSYNC_TRY="$(brew --prefix)/bin/rsync"
fi
if [[ -e "$RSYNC_TRY" ]]; then
RSYNC="$RSYNC_TRY"
fi
@@ -42,6 +45,7 @@ RE+=" --exclude=/.docker/"
RE+=" --exclude=/.dropbox/"
RE+=" --exclude=/.minikube/cache/"
RE+=" --exclude=/Desktop/" # desktop is like a visible tempdir.
RE+=" --exclude=/Library/VoiceTrigger/SAT"
RE+=" --exclude=/Documents/Dropbox/.dropbox.cache/"
RE+=" --exclude=/Documents/Steam?Content/"
RE+=" --exclude=/Downloads/"

+ 25
- 0
ubuntu-makevm/Makefile View File

@@ -0,0 +1,25 @@
export VMNAME := ubuntu1804
export DISK_DIR := /storage/scratch/tmp
export HOST := las1.local

.PHONY: clean install reinstall rcopy rrun

default: remote

clean:
-virsh destroy $(VMNAME)
-virsh undefine $(VMNAME)
rm -f $(DISK_DIR)/$(VMNAME).qcow2

install:
bash install.sh

reinstall: clean install

remote: rrun

rcopy:
rsync -avP ./ root@$(HOST):/storage/admin/vms/

rrun: rcopy
ssh -t root@$(HOST) "cd /storage/admin/vms && make reinstall"

+ 16
- 0
ubuntu-makevm/install.sh View File

@@ -0,0 +1,16 @@
#!/bin/bash

virt-install \
--name $VMNAME \
--ram 32768 \
--disk path=$DISK_DIR/$VMNAME.qcow2,size=20 \
--vcpus 8 \
--os-type linux \
--os-variant generic \
--network bridge=virbr0 \
--graphics none \
--console pty,target_type=serial \
--initrd-inject=preseed.cfg --extra-args "ks=file:/preseed.cfg" \
--location 'http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/' \
--extra-args 'console=ttyS0,115200n8 serial'


+ 185
- 0
ubuntu-makevm/preseed.cfg View File

@@ -0,0 +1,185 @@

### Preseed for Ubuntu 18.04
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
# Derived again from https://gist.github.com/CalvinHartwell/f2d7f5dedbfee2d7d47c583539a10859

d-i auto-install/enable boolean true

d-i debian-installer/language string en
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/country string US
d-i keyboard-configuration/xkb-keymap select US

d-i /choose_interface select auto
# d-i netcfg/hostname string device
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i hw-detect/load_firmware boolean true

### Account setup
d-i passwd/root-login boolean true
d-i passwd/root-password-crypted password !!
d-i passwd/make-user boolean false

d-i clock-setup/utc boolean true
d-i time/zone string UTC
d-i clock-setup/ntp boolean true

# LG provided NTP, should be replaced!
d-i clock-setup/ntp-server string 10.100.202.175

### Partitioning
#d-i preseed/early_command string umount /media || true
d-i partman-auto/method string lvm
d-i partman-auto-lvm/guided_size string max
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/new_vg_name string vg0
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-basicmethods/method_only boolean false

### Partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

### Grub
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

d-i partman-auto-lvm/new_vg_name string vg-root


d-i partman-auto/expert_recipe string \
custom-lvm :: \
269 269 269 ext4 $primary{ } $bootable{ } \
mountpoint{ /boot } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
2152 2152 100% linux-swap $lvmok{ } \
lv_name{ lv_swap } \
in_vg { vg-root } \
method{ swap } \
format{ } \
. \
8608 1 8608 ext4 $lvmok{ } \
mountpoint{ / } \
lv_name{ lv_root } \
in_vg { vg-root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
1076 1 1076 ext4 $lvmok{ } \
mountpoint{ /export/home } \
lv_name{ lv_home } \
in_vg { vg-root } \
method{ format } \
format{ } \
options/nodev{ nodev } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
1076 1 1076 ext4 $lvmok{ } \
mountpoint{ /tmp } \
lv_name{ lv_tmp } \
in_vg { vg-root } \
method{ format } \
format{ } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
options/noexec{ noexec } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
2152 1 2152 ext4 $lvmok{ } \
mountpoint{ /var } \
lv_name{ lv_var } \
in_vg { vg-root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
2152 1 2152 ext4 $lvmok{ } \
mountpoint{ /var/log } \
lv_name{ lv_log } \
in_vg { vg-root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
538 1 538 ext4 $lvmok{ } \
mountpoint{ /var/log/audit } \
lv_name{ lv_audit } \
in_vg { vg-root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
. \
128 1 -1 ext4 $lvmok{ } \
mountpoint{ /tmp/delete } \
lv_name{ lv_delete } \
in_vg { vg-root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
.

d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman/choose_partition select finish
d-i partman/confirm_write_new_label boolean true
d-i partman-auto-lvm/guided_size string max

### Base system installation
d-i base-installer/install-recommends boolean true
d-i base-installer/kernel/image string linux-generic
d-i debconf debconf/frontend select Noninteractive

d-i mirror/http/hostname string 10.100.202.204
d-i mirror/http/directory string /ubuntu
d-i mirror/http/mirror select 10.100.202.204

### Package selection
d-i tasksel/first multiselect none
d-i pkgsel/include string openssh-server
d-i pkgsel/upgrade select full-upgrade
#d-i pkgsel/update-policy select unattended-upgrades
d-i pkgsel/include string openssh-server \
vim \
byobu \
git \
tmux \
build-essential \
open-vm-tools \
telnet \
wget \
curl \
python

d-i preseed/late_command string \
in-target sh -c 'mkdir -p --mode=0700 /root/.ssh'; \
in-target sh -c 'curl https://sneak.cloud/authorized_keys > /root/.ssh/authorized_keys'; \
in-target sh -c 'chmod 0600 /root/.ssh/authorized_keys'; \
in-target sh -c 'echo "IPv4: \\\4" >> /etc/issue && echo "IPv6: \\\6" >> /etc/issue && echo "" >> /etc/issue';

d-i debian-installer/splash boolean false

### Shutdown machine
#d-i finish-install/reboot_in_progress note
#d-i debian-installer/exit/poweroff boolean true

Loading…
Cancel
Save