This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
import 'moment/locale/de'; | |
moment().locale(window.config.app.locale); | |
moment.defaultFormat = window.config.app.dateFormat; | |
const getServerTime = async () => { | |
const response = await fetch(window.location, { | |
method: 'HEAD' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ERLAUBTE_URL = foo.com (zB) | |
<IfModule mod_headers.c> | |
SetEnvIf Origin "^(http(s)?://(www\.)?(ERLAUBTE_URL))$" ORIGIN_SUB_DOMAIN=$1 | |
Header set Access-Control-Allow-Origin: "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = '/static/css/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if ( el.addEventListener ) { | |
el.addEventListener(ev, callback, false); | |
} else if ( el.attachEvent ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( $_FILES["fileupload"] ) { | |
$folder = Asset_Folder::getByPath("/uploads"); | |
$asset = Asset::create( | |
$folder->getId(), | |
array( | |
"filename" => uniqid() . $_FILES["fileupload"]["name"], | |
"data" => file_get_contents($_FILES["fileupload"]["tmp_name"]) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
max-width: 100%; | |
background-color: transparent; | |
width: 100%; | |
margin-bottom: 20px; | |
} | |
table > thead > tr > th, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[type="checkbox"] { | |
position: absolute; | |
overflow: hidden; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
width: 1px; | |
margin: -1px; | |
padding: 0; | |
border: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.keys = Object.keys || (function () { | |
var hasOwnProperty = Object.prototype.hasOwnProperty, | |
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"), | |
DontEnums = [ | |
'toString', | |
'toLocaleString', | |
'valueOf', | |
'hasOwnProperty', | |
'isPrototypeOf', | |
'propertyIsEnumerable', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getObjSize: function(obj) { | |
var size = 0, key; | |
for ( key in obj ) { | |
if (obj.hasOwnProperty(key)) size++; | |
} | |
return size; | |
} |