Skip to content

Instantly share code, notes, and snippets.

View puggan's full-sized avatar

Thorbjörn 'Puggan' Sundragon puggan

View GitHub Profile
@puggan
puggan / helios.kml
Created September 6, 2023 12:15
helios.kml
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark><name>??,Hotel Helios Costa Tropical</name><Point><coordinates>36.73216575784057,-3.6992294901659153,0</coordinates></Point></Placemark>
<Placemark><name>1468289,Ibersol Almuñecar Beach & Spa</name><Point><coordinates>36.732604,-3.699836,0</coordinates></Point></Placemark>
<Placemark><name>11436573,Hotel Victoria Playa</name><Point><coordinates>36.73423,-3.700038,0</coordinates></Point></Placemark>
<Placemark><name>2429195,Hotel La Najarra</name><Point><coordinates>36.7321,-3.69551,0</coordinates></Point></Placemark>
<Placemark><name>90987457,Hotel Noy</name><Point><coordinates>36.732049,-3.695488,0</coordinates></Point></Placemark>
<Placemark><name>18809829,Jardín De Mariote Apartment</name><Point><coordinates>36.733993,-3.701994,0</coordinates></Point></Placemark>
A4 paper is a 2^-4 of an A0, and an A0 is 1m² with one side √2 longer then the others, so when split i half it keeps it's ratio.
Area of an Ax is therefor 2^(-x) m².
The sides of an Bx page is (2^(-.25-x))x(2^(.25-x))
An B1 paper is in the middle between A0 and A1, and the area of an Bx is therefor 2^(.5-x) m².
The sides of an Bx page is (2^(-x))x(2^(.5-x))
An C0 paper is in the middle between B0 and A0, and the area of and Cx is therefor 2^(.25-x) m².
The sides of an Bx page is (2^(-.125-x))x(2^(.375-x))
@puggan
puggan / GeoFeedPugganIPv6.txt
Created October 24, 2021 21:55
GeoFeed Puggan IPv6
2001:470:28:570::/64,SE,SE-O,Göteborg,417 48
@puggan
puggan / scoutid_jwt.md
Last active August 21, 2020 19:33
Scoutid JWT
@puggan
puggan / PSR-12-puggan.md
Last active August 21, 2019 15:10
PSR-12 extended by puggan

The base is PSR-12 from https://www.php-fig.org/psr/psr-12/

Here is some aditions that are allowed, but not enforced by PSR-12:

2.3 Lines

  • PSR-12 says:
    • Blank lines MAY be added to improve readability and to indicate related blocks of code except where explicitly forbidden.
  • I add:
    • There MUST NOT be more then one consecutive blank line.
echo 'body {color: pink}' > pink.less
echo "{}" > package.json
cat << HEREDOC > gulpfile.js
const gulp = require("gulp");
const plug = require("gulp-load-plugins")();
gulp.task("default", () => gulp
.src("pink.less")
.pipe(plug.sourcemaps.init())
.pipe(plug.less())
https://alexnisnevich.github.io/untrusted/
lvl 1: https://gist.github.com/b735d851674ee4bd3be6fd68f699a327
lvl 2: https://gist.github.com/1933f2f8fd6f6a8979badee8ae851d7b
lvl 3: https://gist.github.com/3f591c084483872172e21f58164cd5ea
lvl 4: https://gist.github.com/cb9689e18e67c08d67c030a4a4cfd9aa
lvl 5: https://gist.github.com/753c7f7b7201033b4d67a0cc3a9bf7b8
lvl 6: https://gist.github.com/b35cb130c4337c31e034261c3993ad3d
lvl 7: https://gist.github.com/abf04d64cc80006a66b095dc0c959b7d
lvl 8: https://gist.github.com/79966422553a5feb2338b584b4ae74fb
lvl 9: https://gist.github.com/e48ba09b686c8c356064c7fc204e68c6
Serverside - Cron:
create a base folder, and then put bare git dirs in it.
for each git/subfolder:
* fetch all
* list all `git log --all --date-order --pretty=oneline --show-signature`
* save commit-hash, a project-reference, a gpg status, sign- uid, email and fingerprint
Serverside - JSON
Make an api that takes a commit-hash (or a list of them),
and answer with
@puggan
puggan / openpgp.txt
Created February 15, 2017 22:46
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:be9d250a80631c89186ebfa7a6acbd46a4881be3]
@puggan
puggan / openpgp.txt
Created February 15, 2017 22:42
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:be9d250a80631c89186ebfa7a6acbd46a4881be3]