Skip to content

Instantly share code, notes, and snippets.

Avatar

Marc Wensauer daslicht

View GitHub Profile
@daslicht
daslicht / VideoStream.php
Created Jul 14, 2021 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
View VideoStream.php
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@daslicht
daslicht / ToggleDock.command
Last active May 21, 2021
Toggle macOS dock behaviour, (increase hidden autohide show delay)
View ToggleDock.command
if [[ "$(defaults read com.apple.dock autohide)" -eq "1" ]]; then
# Restore Dock
defaults write com.apple.dock autohide -bool false && killall Dock
defaults delete com.apple.dock autohide-delay && killall Dock
defaults write com.apple.dock no-bouncing -bool FALSE && killall Dock
exit
fi
# Hide Dock
defaults write com.apple.dock autohide -bool true && killall Dock
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
View gist:485fc17f8a692c3cccfb203a88064874
$(document).ready(function ($) {
var client = new WebTorrent();
var timer = null;
window.client = client;
$('.message').removeClass('show');
function addVideo(uri) {
client.add(uri, function (torrent) {
var file = torrent.files.find(function (file) {
@daslicht
daslicht / aml
Last active Apr 9, 2020
SSDT-PLUG forr Asus Gryphon z87
View aml
/*
* XCPM power management compatibility table.
*
* Please note that this table is only a sample and may need to be
* adapted to fit your board's ACPI stack. For instance, both scope
* and device name may vary (e.g. _SB_.PR00 instead of _PR_.CPU0).
*
* While the table contains several examples of CPU paths, you should
* remove all the ones irrelevant for your board.
*/
View Spleeter Workflow
source ~/.bash_profile
echo $PATH
for file in "$@"
do
cd "$(dirname "$file")"
spleeter separate -i "$file" -p spleeter:2stems -o output
done
View steemit_php
<?php
$api = "https://api.steemit.com";
function GetData( $api, $pdata )
{
$ch = curl_init($api); // steemit api
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $pdata); //post data
View gist:ce55553917251bd6891aa46a2176d276
Process: Maschine 2 [2772]
Path: /Applications/Native Instruments/*/Maschine 2.app/Contents/MacOS/Maschine 2
Identifier: com.native-instruments.Maschine 2
Version: 2.7.10 [R605] (2.7.10 [R605], Copyright © 2018 Native Instruments GmbH)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Maschine 2 [2772]
User ID: 501
Date/Time: 2018-12-07 19:23:22.123 +0100
View gist:3ef4d55eaf745ef2ca6db75add534542
Process: Maschine 2 [5177]
Path: /Applications/Native Instruments/*/Maschine 2.app/Contents/MacOS/Maschine 2
Identifier: com.native-instruments.Maschine 2
Version: 2.7.10 [R605] (2.7.10 [R605], Copyright © 2018 Native Instruments GmbH)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Maschine 2 [5177]
User ID: 501
Date/Time: 2018-12-05 19:20:11.128 +0100
View gist:9cd8a6493c9811b927d7c4aaf48aac39
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/Users/daslicht/.node_modules/bin/npm',
1 verbose cli 'install' ]
2 info using npm@4.1.1
3 info using node@v11.1.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly install normalizeTree
@daslicht
daslicht / gist:6eec920d85dde46ae2387defe15a7880
Last active Aug 14, 2017
Windows 10 Errors out of the box
View gist:6eec920d85dde46ae2387defe15a7880
<?xml version="1.0" encoding="UTF-8"?>
<Events>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />
<EventID Qualifiers="0">10016</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>