Skip to content

Instantly share code, notes, and snippets.

View ePirat's full-sized avatar

Marvin Scholz ePirat

View GitHub Profile
# Load git info module
autoload -Uz vcs_info
# Configure git info
local fmt_vcs_status='%F{yellow}‹%b%f%u%c%F{yellow}›%f'
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' unstagedstr '%F{red}●%f'
zstyle ':vcs_info:git:*' stagedstr '%F{green}+%f'
zstyle ':vcs_info:git:*' patch-format ' %p %n/%a'
@ePirat
ePirat / wwdc.md
Last active March 2, 2024 01:18
WWDC Resources

WWDC 2014

  • 704: [Building Apps for Enterprise and Education][704] ([HD][704_HD], [SD][704_SD], [Slides][704_Slides], [ASCII][704_ASCII])
  • 236: [Building Interruptible and Responsive Interactions][236] ([HD][236_HD], [SD][236_SD], [Slides][236_Slides], [ASCII][236_ASCII])
  • 416: [Building Modern Frameworks][416] ([HD][416_HD], [SD][416_SD], [Slides][416_Slides], [ASCII][416_ASCII])
  • 508: [Camera Capture: Manual Controls][508] ([HD][508_HD], [SD][508_SD], [Slides][508_Slides], [ASCII][508_ASCII])
  • 415: [Continuous Integration with Xcode 6][415] ([HD][415_HD], [SD][415_SD], [Slides][415_Slides], [ASCII][415_ASCII])
  • 224: [Core iOS Application Architectural Patterns][224] ([HD][224_HD], [SD][224_SD], [Slides][224_Slides], [ASCII][224_ASCII])
  • 509: [Creating 3D Interactive Content with WebGL][509] ([HD][509_HD], [SD][509_SD], [Slides][509_Slides], [ASCII][509_ASCII])
  • 221: [Creating Custom iOS User Interfaces][221] ([HD][221_HD], [SD][221_SD], [Slides][221_Slides], [ASCII
@ePirat
ePirat / pre-push.sh
Created November 4, 2019 11:34
Push check git hook
#!/bin/bash
protected_remote='origin'
protected_branch='master'
current_remote="$1"
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ $protected_remote = $current_remote ]
then
read -p "You're about to push to $current_remote, is that what you intended? [y|n]" -n 1 -r < /dev/tty
@ePirat
ePirat / main.m
Last active November 6, 2018 15:40
MoltenPlacebo
//
// main.m
// MoltenPlacebo
//
// This proof-of-concept is extremely naive. This is probably not
// what you should be doing for a real program!
//
// Created by Marvin Scholz on 05.11.18.
// Based on sdl.c
//
#!/bin/bash
# Git hook to ask before pushing to specific branch or remote
# Adapted from https://blog.ghost.org/prevent-master-push/
# Put this in .git/hooks/pre-push and do not forget to make it executable
protected_remote='origin'
protected_branch='master'
current_remote="$1"

Compile for Windows (64bit)

Pull the VideoLAN Docker container and run it in interactive mode with bash:

(The -v ~/docker:/root/shared maps /root/shared in the container to ~/docker on your machine to easily obtain the build results, so make sure ~/docker exists.)

docker pull registry.videolan.org:5000/vlc-debian-win64
docker run -v ~/docker:/root/shared -it registry.videolan.org:5000/vlc-debian-win64 /bin/bash

Compile VLC with Qt Intf on macOS

First, export the QTDIR variable, it should contain the path to your Qt 5 directory:

QTDIR="/Applications/Qt/5.9.3/clang_64"

Now, configure VLC:

@ePirat
ePirat / article.md
Last active February 2, 2017 00:44
Häusliche Gewalt in „50 Shades of Grey“

Häusliche Gewalt in „50 Shades of Grey“

Dies ist eine Übersetzung des Artikels „Domestic Violence in 50 Shades of Grey

Am 12. Februar eröffnet Karen Ingala Smith in Zussamenarbeit mit Women's Aid „The Femicide Census: Profiles of Women Killed By Men“ auf einer Konferenz in London. Währenddessen finden sich weniger als 4 km entfernt die Fans zur UK Premiere von Fifty Shades of Grey zusammen, der Film-Adaption des sehr erfolgreichen Romans von EL James. Die beiden Veranstaltungen scheinen nichts miteinander gemeinsam. Doch für Betroffene, die mit häusliche Gewalt zu tun oder diese erlebt haben, sind die beiden Verstanltungen eine verstörende Gegenüberstellung von häuslicher Gewalt mit einer fiktionalen, romantisierten Version dieser, welche von der Gesellschaft akzeptiert wird.

@ePirat
ePirat / INSTALL.md
Last active April 7, 2023 13:43
Cross-compile libaacs for Windows (64bit)

Cross-compile libaacs for Windows (64bit)

For this guide the ubuntu:yakkety Docker image was used.

Install the cross-compile toolchain

apt-get install mingw-w64-tools gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wget gettext bison flex
@ePirat
ePirat / help.md
Created February 27, 2015 14:56
Buy something on Steam while in another Country

Recently I had to buy something on Steam while in another Country. Turns out it was impossible, because the country information of my Payment method differs from the Country selected based on my IP Address. So I contacted the Steam support, and they advised me to pass a special Argument to the URL when visiting the Steam Store through a Webbrowser:

http://store.steampowered.com/?cc=<countrycode>

Replace <countrycode> with a 2 character country code, for example:

http://store.steampowered.com/?cc=DE