Skip to content

Instantly share code, notes, and snippets.

View schliflo's full-sized avatar
💻
🤔💭🔥

Florian Schlittenbauer schliflo

💻
🤔💭🔥
View GitHub Profile
@schliflo
schliflo / functions.php
Last active August 29, 2015 14:26
WP add real fullscreen button to editor
// add this to your theme's functions.php
function my_mce_buttons($buttons) {
array_push($buttons, 'fullscreen');
return $buttons;
}
add_filter('mce_buttons', 'my_mce_buttons');
@schliflo
schliflo / debian-setup.bash
Last active March 22, 2016 15:00
Basic debian setup for fresh installations (inculding swap, zsh with grml config and some other handy tools)
apt-get update -y && \
apt-get upgrade -y && \
apt-get install zsh wget curl unzip htop git ntp -y && \
wget -O .zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc && \
chsh -s /bin/zsh && \
cd /var && \
touch swap.img && \
chmod 600 swap.img && \
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 && \
mkswap /var/swap.img && \
@schliflo
schliflo / beer.js
Last active April 13, 2016 11:58
Test Gist
// this is a simple demonstration of a GitHub Gist
// you may or may not take this seriously ;)
while (!beer.empty) {
drink(beer);
}
@schliflo
schliflo / complex-conditions.ts2
Created November 9, 2016 09:40
complex conditions in typoscript2 or fusion in NEOS
attributes.class = TYPO3.TypoScript:RawArray {
default = 'btn'
large = ${q(node).property('large') ? 'btn-lg': null}
block = ${q(node).property('block') ? 'btn-block': null}
color = ${'btn-' + q(node).property('color')}
color.@if.condition = ${q(node).property('color')}
}
@schliflo
schliflo / frontend-testing.md
Last active January 3, 2023 09:46
A collection of frontend testing tips, tricks and tools

Frontend Testing

This is an incomplete collection of frontend testing tips, tricks and tools. It's just the stuff I've found useful over the years. Feel free to suggest more stuff. I'll add it if I like it ;)

Device Testing

Performance

@schliflo
schliflo / keybase.md
Created March 15, 2017 10:47
keybase.md

Keybase proof

I hereby claim:

  • I am schliflo on github.
  • I am schliflo (https://keybase.io/schliflo) on keybase.
  • I have a public key whose fingerprint is C36A 9F08 F2F5 CED4 89DE 1ACB CDA7 3BCD 5A51 0303

To claim this, I am signing this object:

@schliflo
schliflo / main.js
Last active April 22, 2017 10:35
Random changing background image from a json list of image urls
const body = document.querySelector('body');
const imageBasePath = 'images/Photobox/';
const imageListFile = 'images.json';
const updateInterval = 1000;
let lastUpdated = 0;
let images = [];
let imagesInDoc = [];
function updateImageList(callback) {
let request = new XMLHttpRequest();
@schliflo
schliflo / docker-compose.yml
Last active June 3, 2020 20:10
Docker compose plex letsencrypt proxy setup
# /opt/docker-compose.yml
---
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
container_name: proxy
ports:
- "80:80"
- "443:443"
@schliflo
schliflo / do.sh
Created September 7, 2017 09:09
bash one-liner to find the nearest DigitalOcean data center
for DC in nyc1 nyc2 nyc3 ams2 ams3 sfo1 sfo2 sgp1 lon1 fra1 tor1 blr1; do echo "$DC: $(ping -i .1 -c 100 -q speedtest-$DC.digitalocean.com | awk -F/ '/^round|^rtt/{print $5}')"; done | sort -n -k2
@schliflo
schliflo / sunrise.php.patch
Created November 3, 2017 16:13
Add sunrise.php via composer patch for bedrock based environments
diff --git a/wp-content/sunrise.php b/wp-content/sunrise.php
new file mode 100644
index 00000000..dcefbb0c
--- /dev/null
+++ b/wp-content/sunrise.php
@@ -0,0 +1,37 @@
+<?php
+if ( !defined( 'SUNRISE_LOADED' ) )
+ define( 'SUNRISE_LOADED', 1 );
+