Skip to content

Instantly share code, notes, and snippets.

View andersevenrud's full-sized avatar
🤘
w^w^^w^w

Anders Evenrud andersevenrud

🤘
w^w^^w^w
View GitHub Profile
@andersevenrud
andersevenrud / osjs-launcher-prototype.js
Last active August 1, 2017 22:30
This is just a prototype thingy...
/*!
This is a PROTOTYPE for creating a OS.js System Service.
Right now it allows you to to execute arbitrary commands.
TODO:
- Authentication and user resolving
- Work like an API instead of pure commands
@andersevenrud
andersevenrud / osjs-database-backend.md
Last active May 10, 2017 21:35
OS.js Set up Database as user backend

This is just a copy/paste from the manual on how to set up Database as your user backend.

NOTE that this is not the only choice, but the simplest

Instead of doing all of the node osjs config:set you can make your own file in src/conf/ (ex src/conf/901-my-config.json), but this is optional.

After setup and rebuild, estart your client and server and you should be able to log in :)

@andersevenrud
andersevenrud / osjs-faq.md
Last active April 20, 2017 21:23
OS.js FAQ

Firstly, I ask you to read the maual. If you're having trouble or questions, join the official chat.

This information will end up on the official home page(s) and manuals at some point. I'm aware the documentation is lacking, but it's very hard to maintain being a single person with a full-time job outside of this.

Q: ... Why ?

Because I wanted to...

Q: ... But, why ?

@andersevenrud
andersevenrud / sso-with-wordpress.md
Last active May 23, 2019 13:16
SSO with Wordpress

This is a guide for setting up SSO in Wordpress using Apache.

It is done in these steps:

  1. Set up Active Directory
  2. Install dependencies
  3. Synchronize clocks
  4. Setting up Kerberos
  5. Setting up Apache
  6. Testing
@andersevenrud
andersevenrud / osjs-todo.md
Last active August 14, 2017 16:19
osjs-todo.md

OS.js TODO list

A list of stuff I'd like to add/change some day... in no spesific order:

Apps:

  • FileManager: Implement search
  • FileManager: Drag and drop to folders
  • FileManager: Clean up codebase
  • CoreWM: Sortable iconview (Like windows desktop)
@andersevenrud
andersevenrud / X11.md
Created December 10, 2016 18:30
OS.js on X11

Install OS.js as a Linux Distribution

Disclaimer This is experimental, and is not intended for usage when developing/testing OS.js. If that is what you're looking for, do a "normal" installation.

THIS HAS NOT BEEN UPDATED TO BE COMPATIBLE WITH THE NOVEMBER 2016 UPDATE -- STAY TUNED FOR MORE UPDATES

Building your own

OS.js can run as a X11 Desktop.

@andersevenrud
andersevenrud / OS.js Lua HTTP Server Setup
Created August 14, 2016 15:45
OS.js Lua HTTP Server Setup
Just quick and dirty instructions on how to run the Lua server on OS.js. Since this runs natively on arduino via build scripts originally -- you have to do some manual wizzardry.
# Files
They are located in the arduino build: https://github.com/os-js/OS.js/tree/arduino/src/server/lua
1. `osjs-api` This is the API endpoint. Place this as `osjs/dist/API`
2. `osjs-fs` This is the VFS endpoint. Place this as `osjs/dist/FS`
3. `osjs.lua` This is the OS.js server script. Place this in `/usr/lib/lua`
4. `session.lua` HTTP Session Library. Place this in `/usr/lib/lua`
@andersevenrud
andersevenrud / LOC.sh
Created June 25, 2016 20:29
Count LOC in your git project
#!/bin/bash
declare -a types=("js" "css" "html" "php" "less" "json" "md")
total=0
count=0
for i in "${types[@]}"; do
num=$(git ls-files | grep -s "\.$i\$" | wc -l)
loc=$(git ls-files | grep -s "\.$i\$" | xargs cat 2>/dev/null | wc -l)
echo "${i}: ${loc} in ${num} file(s)"
@andersevenrud
andersevenrud / iframeapi-markup.html
Created June 24, 2016 21:48
OS.js Iframe Application bi-directional API script (Iframe Example)
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="iframeapi.js"></script>
<script>
// The event emitted when everything is loaded
OSjs.on('init', function() {
console.log(arguments);
@andersevenrud
andersevenrud / iframeapi-app.js
Created June 24, 2016 21:47
OS.js Iframe Application bi-directional API script (Application Example)
// If you send `message` it gets caught by the custom defined event
this.postMessage({message: 'something', bar: 'baz'});
// But not this. It will get caught by the global one
this.postMessage({zazz: 'jazz'});
// To check messages from iframe
ApplicationFooBar.prototype.onPostMessage = function(message, ev) {
console.warn(message.cool); // === "Awesome"
};