Skip to content

Instantly share code, notes, and snippets.

View lotterfriends's full-sized avatar

André Tarnowsky lotterfriends

View GitHub Profile
HP: Homepage
FH: Flathub
- vscode (HP)
- slack (HP)
- zoom (HP)
- libre office (FH)
- evolition (FH)
- gitg (FH)
- Flameshot (GitHub)
@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) {
@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 / 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 / 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 / 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 / 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 / phpdevenv.sh
Last active November 6, 2016 17:14
install php5, php7, mysql, phpmyadmin with linux (ubunut 16 based systems and up)
# apache
sudo apt-get install apache2 apache2-doc
# header module
sudo a2enmod headers
# rewrite module
sudo a2enmod rewrite
# php
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
@lotterfriends
lotterfriends / .bash_profile
Created October 27, 2016 10:48
bash_profile für mac
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@lotterfriends
lotterfriends / text.content.html
Last active May 17, 2018 09:29
wordpress social widget
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<style>
.my-social a {
color: #363636 !important;
margin-right: 5px;
}
</style>
<div class="my-social">