Skip to content

Instantly share code, notes, and snippets.

// erklärung 3d: http://blackpawn.com/texts/pointinpoly/
// code unten kopiert von: http://stackoverflow.com/a/2049593
// auf welcher seite der gerade bc ist punkt a?
// http://stackoverflow.com/questions/22668659/calculate-on-which-side-of-a-line-a-point-is
// cross product 2d: http://allenchou.net/2013/07/cross-product-of-2d-vectors/
function sign(a, b, c) {
return (a[0] - c[0]) * (b[1] - c[1])
- (b[0] - c[0]) * (a[1] - c[1]);
}
-- Module instantiation
local cjson = require "cjson"
local cjson2 = cjson.new()
local cjson_safe = require "cjson.safe"
-- Initialize the pseudo random number generator
-- Resource: http://lua-users.org/wiki/MathLibraryTutorial
math.randomseed(os.time())
math.random(); math.random(); math.random()
(function(videojs) {
var oontvthek = function(options) {
var player = this;
function initMenu() {
var MenuItem = videojs.getComponent('MenuItem');
var ResolutionMenuItem = videojs.extend(MenuItem, {
constructor: function(player, options){
options.selectable = true;
// Sets this.player_, this.options_ and initializes the component
--- apt-get install lua-cjson
local cjson = require "cjson"
local cjson2 = cjson.new()
math.randomseed(os.time())
local headers = {}
headers["Content-Type"] = "application/json"
local platforms = {'moz', 'gcm', 'invalid-platform'};
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - equirectangular video panorama demo</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
background-color: #000000;
@oberhamsi
oberhamsi / index.html
Created December 14, 2015 18:49
viewer for webmap generated by alloc's server fixes
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
</head>
<body>
<div id="7map" style="height: 100%"></div>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
var page = require('webpage').create();
var system = require('system');
var lastReceived = new Date().getTime();
var requestCount = 0;
var responseCount = 0;
var requestIds = [];
var startTime = new Date().getTime();
page.onResourceReceived = function (response) {
@oberhamsi
oberhamsi / reinhardt-i18n.js
Last active August 29, 2015 14:24
reinhardt i18n strawman
var {Application} = require('stick');
var {Reinhardt} = require('reinhardt');
var ResBundle = require("ilib/lib/ResBundle");
// Resources is the interface that reinhardt requires
var Resources = function(locale) {
this.rb = new ResBundle({
locale: locale,
type: "html",
loadParams: {
@oberhamsi
oberhamsi / background.js
Created June 3, 2015 07:00
video downloader
// Video Infos holen
var jsonString = $(".player_viewport").find("DIV:nth-child(4)").attr("data-jsb");
var videoObj = $.parseJSON(jsonString);
if (videoObj.playlist.videos.length == 1) {
var sources = videoObj.selected_video.sources;
// Download-Menü erstellen
createDownloadMenu(".mod_player > .service_footer", "Sendung herunterladen");

User

FIXME

Attributes

Name Type Description Example
created_at date-time when user was created "2012-01-01T12:00:00Z"
id uuid unique identifier of user "01234567-89ab-cdef-0123-456789abcdef"