Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian Lasse sebilasse

View GitHub Profile
@sebilasse
sebilasse / html5_link_rel.json
Last active Feb 5, 2016
<a rel= values JSON
View html5_link_rel.json
View schema-org-gen-test
var fs = require('fs');
var path = require('path');
var tv4 = require('tv4');
var dir = '/ENTER_THE_PATH_TO__schema.org_DIR__HERE';
var schema = path.join(dir, 'Event.json');
var data = {
"@context": "http://schema.org",
"@type": "Event",
@sebilasse
sebilasse / check.sh
Created Aug 29, 2016 — forked from remy/check.sh
Obviously change remysharp.com for the domain you want to check.
View check.sh
curl http://web.archive.org/cdx/search/cdx\?limit\=1\&url\=remysharp.com | awk '{ print $2 }' | xargs date -j -f "%Y%m%d%H%M%S"
@sebilasse
sebilasse / LDOsnippets.js
Created Aug 30, 2016
How to validate a hyperschema LDO ?
View LDOsnippets.js
/*
Question: GET parameters OR POST body are validated with LDO#schema -
but how to validate (RFC 6570) URI template variables in the path ?
1) Path variables must be unique ("exclusive from params|body").
They could then be mixed in the params|body and validated via LDO#schema as well
2) Heroku seems to make use of parantheses in URI templates to validate the variales
RFC 6570 : "The expression syntax specifically excludes use of the dollar ("$") and parentheses ["(" and ")"] characters
so that they remain available for use outside the scope of this specification." ::
@sebilasse
sebilasse / dojo2_request_node.ts
Last active Oct 9, 2016
dojo2/request/node changes
View dojo2_request_node.ts
/* dojo2/request/node */
/* imports ... TODO MOD:
uses a custom Error for `maxRedirects` :
`import RequestMaxRedirectsError from './errors/RequestMaxRedirectsError';`
and needs `lang/mixin`
*/
// TODO: Where should the dojo version come from? It used to be kernel, but we don't have that.
let version = '2.0.0-pre';
View indieauth-node-propsal.md

Proposal : Scoped IndieAuth

draft0 :: extension, completely backwards compatible

Story

As an internet user I would like my personal domain to serve as my online identity and so I am using the best solution, "IndieAuth" :

I have to enter my own domain directly at any page where I want to login , but

View OpenStreetMaps.js
/* TODO - FIXME function was written from scratch, SHOULD be in an "openstreetmap" module !!! */
function parseOSM(query) {
$(":root").addClass('js');
var drawMap = function(id, latLon) {
var mPoint = ol.proj.transform([latLon[1], latLon[0]], 'EPSG:4326', 'EPSG:3857');
var iconFeature = new ol.Feature({ geometry: new ol.geom.Point(mPoint) });
var iconStyle = new ol.style.Style({
image: new ol.style.Icon({
anchor: [0.5, 46],
@sebilasse
sebilasse / blockShortlinks.md
Last active Jul 13, 2017
Proposal: Shortlinks for indieweb principles and building blocks
View blockShortlinks.md
View languageOutput.json
{
"natural": [
{
"id": "bs",
"rank": 1,
"score": 1.233,
"name": "Bosnian (Latin)",
"locale": "bs-Latn-BA",
"script": {
"name": "Latin",
@sebilasse
sebilasse / IANAhttps
Created Jul 16, 2017
Open Letter to IANA
View IANAhttps
To: iana@iana.org, vulnerabilities@eff.org
Security issue : HTTP(S) and WHOIS
Hello there,
if a user looks for a domain at the official .me WHOIS, the request is always
sent in plaintext via HTTP.