glowingkitty / hackspaceos Goto Github PK
View Code? Open in Web Editor NEWThe online hub for your local hackspace.
License: MIT License
The online hub for your local hackspace.
License: MIT License
'create an online event' is broken in several ways
also 'translate this page' and 'edit page text' simply lead to this github which is great and all but its totally unclear how to eactually edit the page , and in any case doing a PR or the like still doesn't actually change the page, some superuse wwould have to ul/dl the page or the like, making the whole business rather painful
Will research and add information here. 👍
We now have a CodiMD instance at https://pad.noisebridge.info
It is a drop-in replacement for etherpad with additional functionality. See this documentation for details on migrating.
I'd like to integrate this with the website, as an in-house addition to the regular pad.riseup*
HackspaceOS looks great. It looks like you could add a ssb gathering integration with HackspaceOS’s events. In database/models/events.py in the publish method, it calls create_discourse_event and a commented-out create_discourse_event. There could be a create_ssb_gathering method added and called from there. The other create*_event methods instantiate something from _apis/models. So you could make a _apis/models/gathering.py, put code in there to publish and edit gatherings, and call it from _database/models/events.py.
To create and edit gatherings, call RPC methods on your pub’s ssb-server. There are a few ways to do this. Is your pub ssb-server running on the same machine and user as HackspaceOS, or a different one?
To publish an SSB gathering, publish a SSB message with type “gathering”. The key of the resulting message is your gathering id. Then publish a message with type “about”, referencing the created gathering, and including data describing it, i.e. title, description, start date-time, location, and image. (There is no end time or duration field; that information could be put in the description.) To edit the gathering, publish another “about” message referencing the gathering and including the fields to change. Optionally include the previous about messages in a “branch” property.
I can go in more detail about this and give examples if you want.
Here is a draft implementation (untested), roughly matching the existing meetup & discourse integration:
0001-Add-Secure-Scuttlebutt-Gatherings-for-Events.patch
This uses sbotc to communicate with ssb-server. So either ssb-server and HackspaceOS must run as the same user, or you can do something so that the HackspaceOS instance can access the pub’s ssb key and/or unix socket in its ~/.ssb directory. Or put a new key for it there and add its id to the pub’s “master” config array.
Details on our secure scuttlebutt server at https://www.noisebridge.net/wiki/Pub
The Mozilla documentation describes something called a Content-Security-Policy which is becoming more used in websites, especially those which serve up pages to smartphones.
From personal experience, they're a pain.
The Cordova (Adobe PhotoGap) documentation included this.
Here are some example CSP declarations for your `.html` pages:
<!-- Good default declaration:
* gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
* https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
* Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
* Enable inline JS: add 'unsafe-inline' to default-src
* Enable eval(): add 'unsafe-eval' to default-src
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
<!-- Allow everything but only from the same origin and foo.com -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">
<!-- This policy allows everything (eg CSS, AJAX, object, frame, media, etc) except that
* CSS only from the same origin and inline styles,
* scripts only from the same origin and inline styles, and eval()
-->
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
<!-- Allows XHRs only over HTTPS on the same domain. -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">
<!-- Allow iframe to https://cordova.apache.org/ -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org">
I've noticed that my own websites will happily work on a standard browser (Safari on macOS). But then you try the same thing from an iOS or Android device and suddenly they're getting all paranoid about the same things you did before. There will be some kind of terse error in the console log which boils down to either no CSP or it doesn't like it somehow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.