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
#!/bin/bash
#
# Script for migrating a VHD
#
# Anders Evenrud <andersevenrud@gmail.com>
#
# http://serverfault.com/questions/508251/migrating-xenserver-vms-from-intel-to-amd-servers
# http://wiki.xen.org/wiki/Proposal:_Disk_import/export
# http://wiki.xen.org/wiki/XAPI_Command_Line_Interface
" 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
<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>
1: Ex, create `src/conf/900-custom.json`
{
"server": {
"proxies": {
"/foo": "http://somewhere-else",
"(regexp)/^\\/bar/": "http://somewhere-elsewhere"
}
}
}
@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
@andersevenrud
andersevenrud / bbhooah.user.js
Last active April 11, 2016 06:02
Bring Battlelog Hooahs back!
// ==UserScript==
// @name Bring Battlelog Hooahs back!
// @namespace http://andersevenrud.github.io/
// @version 0.7
// @description You get the old "Hooah" back instead of "Like" (In the Battle Feed!)
// @match http://battlelog.battlefield.com/*
// @updateURL https://gist.github.com/andersevenrud/c4cf8ec40ed25c2ef2cf/raw/bbhooah.user.js
// @downloadURL https://gist.github.com/andersevenrud/c4cf8ec40ed25c2ef2cf/raw/bbhooah.user.js
// @author andersevenrud
// ==/UserScript==
@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 / 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 <andersevenrud@gmail.com>
@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 <andersevenrud@gmail.com>
* 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 <andersevenrud@gmail.com>
* 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