Skip to content

Instantly share code, notes, and snippets.

View attilavago's full-sized avatar
💭
Code is happening...

Attila Vago attilavago

💭
Code is happening...
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Stories</name>
<NetworkLink>
<name>9ft in Common - Alleys</name>
<Link>
<href><![CDATA[https://www.google.com/maps/d/kml?mid=1cvS3_dA3XbGEn-W-6bBeNqs28foQ0VOV&lid=ELaBumgGKz4]]></href>
</Link>
</NetworkLink>
@attilavago
attilavago / Stories.kml
Created March 23, 2021 20:27
Belfast maps
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Stories</name>
<Style id="icon-1846-424242-normal">
<IconStyle>
<color>ff424242</color>
<scale>1</scale>
<Icon>
<href>https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png</href>
@attilavago
attilavago / dictionary.md
Last active May 12, 2023 14:37
Design-Name - Accessible-Name Dictionary
Design Name Accessible Name Code Example Reference Materials Notes
Floating action button (fab) Button <button> don't give it a tabindex higher than zero
Slider Input, Range <input type='range'/>
Switch Checkbox <input type="checkbox">
Breadcrumb Link <a href="some-step">
Stepper there isn't one focus on describing the experience and make the step contents semantic, maybe use anchor links
Tabs ARIA Tabpanel, Tablist, Tab Tabs example
Card doesn't exist focus on making its content semantic, and if it's a list of cards, make sure the list is semantic and parsable, or use article if it makes sense
Accordion doesn't exist Accordion example focus on making its content semantic and navigable
@attilavago
attilavago / main.dart
Last active August 15, 2020 22:56
A Dart enum example
enum Status {
none,
running,
stopped,
paused
}
void main() {
print(Status.values);
Status.values.forEach((value) => print('value: $value, index: ${value.index}'));
@attilavago
attilavago / matildem.js
Last active January 18, 2018 22:34
partial app.js for R.O.A.S.
if('serviceWorker' in navigator){
navigator.serviceWorker
.register('./service-worker.js')
.then(function(){
window.isUpdateAvailable = new Promise(function (resolve, reject) {
if ('serviceWorker' in navigator && ['localhost', '127'].indexOf(location.hostname) === -1) {
navigator.serviceWorker.register('service-worker.js').then(function (reg) {
reg.onupdatefound = function () {
var installingWorker = reg.installing;
installingWorker.onstatechange = function () {
@attilavago
attilavago / gulpfile.js
Last active January 18, 2018 22:20
Gulpfile for R.O.A.S. service worker
var gulp = require('gulp');
var swPrecache = require('sw-precache');
gulp.task('generate-service-worker', function(callback) {
var rootDir = 'app';
swPrecache.write(`${rootDir}/service-worker.js`, {
staticFileGlobs: ['app/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff,woff2,mp3,json}'],
maximumFileSizeToCacheInBytes: ['52428800']
}, callback);
@attilavago
attilavago / manifest.json
Created January 18, 2018 22:17
R.O.A.S. Manifest
{
"name":"Rhythm of the Stride",
"short_name":"R.O.A.S.",
"icons":[
{
"src":"images/icons/icon-512x512.png",
"sizes":"512x512",
"type":"image/png"
},
{
@attilavago
attilavago / puck_pp_presenter-v2.js
Last active April 4, 2020 12:18
PowerPoint presenter using a Puck.js beacon's button only!
var kb = require("ble_hid_keyboard");
NRF.setServices(undefined, { hid : kb.report });
var reset_timer;
var next = "n";
var prev = "p";
function sendPrev(){
sendCharPrev();
LED2.set();
@attilavago
attilavago / puck_pp_presenter.js
Last active November 20, 2019 16:44
PowerPoint presenter using a Puck.js beacon's button and magnetic sensor.
var kb = require("ble_hid_keyboard");
NRF.setServices(undefined, { hid : kb.report });
var next = "n";
var prev = "p";
function sendPrev(){
sendCharPrev();
LED2.set();
setTimeout("LED2.reset()",1000);
}
@attilavago
attilavago / promises.js
Created January 25, 2017 15:35
Node.js ES6 Promises Example
new Promise(function(resolve, reject) {
setTimeout(function() {
var firstVal = 1;
// in the promise what you resolve is what gets returned
resolve(firstVal);
console.log('the initial promise renders: ', firstVal);
}, 3000); // faking some longer process
})
.then(function(firstVal) {
var secondVal = firstVal + 1;