Skip to content

Instantly share code, notes, and snippets.

View Olli's full-sized avatar

Olli

  • Freelancer
  • Germany - near Dresden
View GitHub Profile
@Olli
Olli / gist:5641a270d78bae304285c3d241dd22ca
Created September 14, 2022 08:42
Increase pipewire alsa headroom
pw-cli s <device id> Props '{ params = [ "api.alsa.headroom" 1024 ] }'
@Olli
Olli / ublock-bento.de-spiegel-plus-filter
Last active July 2, 2023 17:26
Dieser Filter für UBlock filtert diesen unnötigen Crap von Bento.de sowie Spiegel-Plus Headlines aus den Schlagzeilen www.spiegel.de/schlagzeilen - SPON - Spiegel Online
www.spiegel.de##[data-area="article-teaser-list"] > div:has( a[href*="bento.de"] )
www.spiegel.de##[data-area="article-teaser-list"] > div:has( [id*="splus"] )
! thx @RolfWojtech
www.spiegel.de##:xpath(//article[.//header//span[contains(@data-contains-flags,"paid")]])
www.spiegel.de##:xpath(//li[.//span[contains(@data-contains-flags,"paid")]])
@Olli
Olli / gist:fd5ed503abf47c031b18a462e2e740f8
Last active March 6, 2019 14:49
.htaccess für Contao 4.* - einfach vor die bestehende <IfModule mod_rewrite.c> einfügen
<IfModule mod_mime.c>
AddType application/javascript js jsonp
AddType application/json json
AddType audio/ogg oga ogg
AddType audio/mp4 m4a f4a f4b
AddType video/ogg ogv
AddType video/mp4 mp4 m4v f4v f4p
AddType video/webm webm
AddType video/x-flv flv
AddType image/svg+xml svg svgz
@Olli
Olli / will_paginate_seo_helper.rb
Created August 29, 2018 13:24
will_paginate and SEO prev next head link tags
#put it into one of your app/helpers files
# you have to replace the collection_path with the path of your model!
# tag.link only works from rails 5.1 ... prior you have to use content_tag ...
# next - prev links header
def pagination_head_tags(collection)
if collection.total_pages
link_tags = ""
if collection.current_page < collection.total_pages
link_tags += tag.link nil, href: collection_path(page: collection.current_page + 1), rel: "next"
end
@Olli
Olli / gist:3f34490a8cb2f2f4f66052647e7763f1
Created January 12, 2018 11:30
Git: Wrong conflict resolution reverted
gitk ... search for the last commit before the merge
git checkout <sha1-of-this-commit>
git branch <newbranchname>
git checkout <newbranchname>
git merge <branch-which-original-is-merged>
... redo the conflict resolution
/* Server code in C */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>