Skip to content

Instantly share code, notes, and snippets.

Avatar

Marvin Scholz ePirat

View GitHub Profile
@ePirat
ePirat / spec.md
Last active August 30, 2023 17:00
Icecast Protocol specification
View spec.md
@ePirat
ePirat / INSTALL.md
Last active April 7, 2023 13:43
Cross-compile libaacs for Windows (64bit)
View INSTALL.md
View likebira_prompt.zsh
# 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'
View VLCWinCompile.md

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
@ePirat
ePirat / wwdc.md
Last active December 11, 2021 01:15
WWDC Resources
View wwdc.md

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
View pre-push.sh
#!/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
View main.m
//
// 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
//
View pre-push.sh
#!/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"
View VLCQtCompileMacOS.md

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 / startserver.js
Created August 11, 2011 23:54
Node js - Chat Server (NSFW)
View startserver.js
Array.prototype.has = function(value) {
var i;
for (var i = 0, loopCnt = this.length; i < loopCnt; i++) {
if (this == value) {
return true;
}
}
return false;
};