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 / iframeapi.js
Last active October 9, 2016 18:48
OS.js Iframe Application bi-directional API script
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2015, Anders Evenrud <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
@andersevenrud
andersevenrud / web.js
Last active June 22, 2016 18:01
OS.js HTTP VFS Module
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2016, Anders Evenrud <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
@andersevenrud
andersevenrud / lua-rednet-printer-driver.lua
Last active June 8, 2016 19:53
Lua Rednet Printer Driver
--
-- PRINTER FUNCTION
--
--[[
This is a printer driver for Redned Printer.
You can send a title + message and it will automatically print out the pages limited to 25x21 characters.
@author Anders Evenrud <[email protected]>
@andersevenrud
andersevenrud / localstorage.js
Last active June 16, 2016 16:12
localstorage.js
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2016, Anders Evenrud <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
@andersevenrud
andersevenrud / server.lua
Created May 17, 2016 16:16
OS.js Application API Lua boilerplate
#!/usr/bin/lua
--
-- This is a OS.js Application API example for Lua
--
local function request(m, a, request, response)
local result = false
-- error, result
@andersevenrud
andersevenrud / osjs-find-used.icons.sh
Last active April 9, 2016 20:00
osjs-find-used.icons.sh
#!/bin/bash
#
# First, run "grunt"
#
# Then `./osjs-find-used.icons.sh | sort | uniq` to get a list of all icons used
#
GREPPED=$(grep -RHIi "\.png" dist/ | egrep -o '\w+\/[_A-Za-z0-9\-]+\.png')
for g in $GREPPED; do
if [ -f "src/client/themes/icons/default/16x16/${g}" ]; then
echo $g
1: Ex, create `src/conf/900-custom.json`
{
"server": {
"proxies": {
"/foo": "http://somewhere-else",
"(regexp)/^\\/bar/": "http://somewhere-elsewhere"
}
}
}
<application-window data-id="MyProjectWindow" data-width="600" data-allow_maximize="false" data-allow_minimize="false">
<gui-fragment data-fragment-id="TabsTheme" />
</application-window>
<application-fragment data-id="TabsTheme">
<gui-tabs>
<gui-tab-container data-id="TabTheme" data-label="Theme">
<gui-fragment data-fragment-id="TabThemeFragment"></gui-fragment>
" Enable filetype plugin
filetype plugin on
filetype indent on
" Filetypes and encoding
set fileformats=unix,dos,mac
set encoding=utf-8
set wildignore=.svn,CVS,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif
" General behaviour
@andersevenrud
andersevenrud / wordpress-hack.md
Created March 5, 2016 19:37
wordpress-hack.md

Wordpress is a very popular target for hackers. They normally get in with holes found in plugins, themes or in wordpress core.

Prevention methods

An up-to-date installation (including plugins and themes) is crutial!

Hardening Wordpress is sadly not a part of the standard installation documentation, but they have a guide available in the "codex": http://codex.wordpress.org/Hardening_WordPress

Removing unused plugins and users, setting htpasswd and/or ip-whitelisting in //wp-admin// also should be considered.