Skip to content

Instantly share code, notes, and snippets.

@luisdiasdev
luisdiasdev / docker-compose.yml
Last active September 14, 2023 22:05
[docker-compose] Simple Bitnami Zookeeper + Kafka + Kafdrop Admin UI compose file
version: '3'
services:
zookeeper:
image: bitnami/zookeeper:3-debian-10
ports:
- 2181:2181
volumes:
- zookeeper_data:/bitnami
environment:
@andriika
andriika / mpeg-dash live stream.md
Last active February 27, 2024 09:41
live video streaming, html5, mpeg-dash, ffmpeg

Live streaming with HTML5

This document contains collected notes regarding html5 live streaming approaches. I'm trying to understand how to build a system that enables streaming of live video to HTML5 clients. Following content is mainly centered around MPEG-DASH - modern way of dealing with given needs.

Approach 1

To prepare movie.avi from MPEG-DASH streaming we will execute following ffmpeg commands:

> ffmpeg -y -i movie.avi -an -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 1500k -maxrate 1500k -bufsize 3000k -vf "scale=-1:720" movie-720.mp4
> ffmpeg -y -i movie.avi -an -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 800k -maxrate 800k -bufsize 1600k -vf "scale=-1:540" movie-540.mp4
> ffmpeg -y -i movie.avi -an -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 400k -maxrate 400k -bufsize 800k -vf "scale=-1:360" movie-360.mp4
@anestan
anestan / directprinting.php
Last active February 13, 2024 08:04
direct printing php dot matrix
<?php
//set printing option to raw
$tmpdir = sys_get_temp_dir(); # ambil direktori temporary untuk simpan file.
$file = tempnam($tmpdir, 'ctk'); # nama file temporary yang akan dicetak
$handle = fopen($file, 'w');
$condensed = Chr(27) . Chr(33) . Chr(4);
$bold1 = Chr(27) . Chr(69);
$bold0 = Chr(27) . Chr(70);
$initialized = chr(27).chr(64);
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@ianchen06
ianchen06 / phantomjs_install.sh
Last active April 13, 2019 09:26
How to install PhantomJS on CentOS/RHEL
yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
tar -xjvf ~/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components 1 /opt/phantomjs/
sudo yum install libffi-devel openssl-devel
pip install pyopenssl pyasn1
pip install requests[security]
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active March 30, 2024 04:14 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@vertexclique
vertexclique / cracking.md
Last active April 8, 2024 18:24
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@hieblmedia
hieblmedia / .gitignore
Last active March 20, 2024 01:22
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@nghuuphuoc
nghuuphuoc / 1) Add repos
Last active July 30, 2018 22:22
Install PHP 5 on Centos 6
// Install remi repos
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm