Skip to content

Instantly share code, notes, and snippets.

View stillwyw's full-sized avatar
🌋

yunwei stillwyw

🌋
View GitHub Profile
@TonyVlcek
TonyVlcek / trumbowyg-fontawesome-icons.css
Last active June 1, 2020 07:35
FontAwesome icons for Trumbowyg
.trumbowyg-viewHTML-button:after {
font-family: FontAwesome;
content: "\f121";
}
.trumbowyg-undo-button:after {
font-family: FontAwesome;
content: "\f0e2";
}
"""
A bunch of PDF utilities for Django, wkhtmltopdf and pdftk
Note: These have been cobbled together from various projects,
and probably can't be trusted. Make sure you read over
and full understand the code fully before attempting to use!
"""
import sys, os, csv
import subprocess
@bmcbride
bmcbride / LeafletToWKT.js
Last active June 7, 2022 02:17
Leaflet layer to WKT
function toWKT(layer) {
var lng, lat, coords = [];
if (layer instanceof L.Polygon || layer instanceof L.Polyline) {
var latlngs = layer.getLatLngs();
for (var i = 0; i < latlngs.length; i++) {
latlngs[i]
coords.push(latlngs[i].lng + " " + latlngs[i].lat);
if (i === 0) {
lng = latlngs[i].lng;
lat = latlngs[i].lat;