Skip to content

Instantly share code, notes, and snippets.

View ePirat's full-sized avatar

Marvin Scholz ePirat

View GitHub Profile
@ePirat
ePirat / spec.md
Last active November 7, 2024 19:07
Icecast Protocol specification

Icecast protocol specification

What is the Icecast protocol?

When speaking of the Icecast protocol here, actually it's just the HTTP protocol, and this document will explain further how source clients need to send data to Icecast.

HTTP PUT based protocol

Since Icecast version 2.4.0 there is support for the standard HTTP PUT method. The mountpoint to which to send the data is specified by the URL path.

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 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 / 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
# 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 / 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 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)
Array.prototype.has = function(value) {
var i;
for (var i = 0, loopCnt = this.length; i < loopCnt; i++) {
if (this == value) {
return true;
}
}
return false;
};