Skip to content

Instantly share code, notes, and snippets.

View lotterfriends's full-sized avatar

André Tarnowsky lotterfriends

View GitHub Profile
@lotterfriends
lotterfriends / bla.js
Last active November 1, 2017 14:55
portalfeatures
// export
x = []; $('.inputHost:checked').each(function(a,b) {x.push(b.value)}); console.log(x)
// import
x="Ausgabe von Export";x.forEach(function(a) { document.querySelector('.inputHost[value="'+a+'"]').checked = true })
@lotterfriends
lotterfriends / flv-video.js
Last active November 15, 2017 09:08
create videojs Tech inline with vanilla js, integrate flv.js and video.js
// <video controls preload="auto" class="video-js myPlayer">
// <source src="bla.flv" type='video/x-flv'>
// </video>
var Tech = videojs.getTech('Html5');
FlashTech.prototype = Object.create(Tech.prototype);
function FlashTech(options) {
Tech.call(this, options);
@lotterfriends
lotterfriends / cage.sh
Last active December 14, 2017 15:53
set a background image of nicolas cage
wget http://allswalls.com/images/nicolas-cage-wallpaper-1.jpg && gsettings set org.gnome.desktop.background picture-uri $(echo file:///$(pwd)/nicolas-cage-wallpaper-1.jpg)
@lotterfriends
lotterfriends / mvn-color.sh
Created July 25, 2018 07:54
add colors to maven (cygwin/linux)
# Formatting constants
export BOLD=`tput bold`
export UNDERLINE_ON=`tput smul`
export UNDERLINE_OFF=`tput rmul`
export TEXT_BLACK=`tput setaf 0`
export TEXT_RED=`tput setaf 1`
export TEXT_GREEN=`tput setaf 2`
export TEXT_YELLOW=`tput setaf 3`
export TEXT_BLUE=`tput setaf 4`
export TEXT_MAGENTA=`tput setaf 5`
@lotterfriends
lotterfriends / filepicker.js
Last active March 2, 2019 10:20
custom tinymce 5 file browser and picker
(function() {
$().ready(function() {
var adminUrl = $('body').data('route-admin');
window.initWYSIWYG = function(mediaContent) {
tinymce.init({
selector: '.wysiwyg',
height: 500,
@lotterfriends
lotterfriends / mat-paginator-intl-de.ts
Created February 27, 2020 10:42
german paginator
import {MatPaginatorIntl} from '@angular/material';
export class MatPaginatorIntlDe extends MatPaginatorIntl {
firstPageLabel = 'Erste Seite';
lastPageLabel = 'Letzte Seite';
itemsPerPageLabel = 'Einträge pro Seite';
nextPageLabel = 'Nächste Seite';
previousPageLabel = 'Vorherige Seite';
getRangeLabel = function (page, pageSize, length) {
if (length === 0 || pageSize === 0) {
HP: Homepage
FH: Flathub
- vscode (HP)
- slack (HP)
- zoom (HP)
- libre office (FH)
- evolition (FH)
- gitg (FH)
- Flameshot (GitHub)