Skip to content

Instantly share code, notes, and snippets.

View pristavu's full-sized avatar

Andrei Pristavu pristavu

View GitHub Profile
@pristavu
pristavu / .env
Created January 12, 2022 12:24 — forked from PhiloNL/.env
Simple, fast, and resilient open-source WebSockets server using Soketi with SSL in less than 5 minutes
PUSHER_HOST=socket.yourdomain.com
PUSHER_APP_ID=unlock
PUSHER_APP_KEY=123
PUSHER_APP_SECRET=456
PUSHER_PORT=443
PUSHER_SCHEME=https
@pristavu
pristavu / texttopdftools.md
Created April 6, 2021 06:17 — forked from geramirez/texttopdftools.md
Command Line Text to PDF Tools
@pristavu
pristavu / agnosterhacked.zsh-theme
Created December 28, 2020 07:45 — forked from firflant/agnosterhacked.zsh-theme
Agnoster with timestamp - a theme for ZSH terminal
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
# HACKED BY KOKOS - Timestamp added to prompt.
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
@pristavu
pristavu / udp.js
Created October 1, 2020 22:14 — forked from sid24rane/udp.js
Simple UDP Client and Server in Node.js ==> ( Echo Server )
var udp = require('dgram');
// --------------------creating a udp server --------------------
// creating a udp server
var server = udp.createSocket('udp4');
// emits when any error occurs
server.on('error',function(error){
console.log('Error: ' + error);
@pristavu
pristavu / .zshrc
Last active October 4, 2020 04:59 — forked from karlhadwen/.zshrc
.zshrc settings
export ZSH="/Users/andrew/.oh-my-zsh"
export PATH=${PATH}:/usr/local/mysql/bin/
ZSH_THEME="robbyrussell"
plugins=(
git
osx
zsh-autosuggestions
last-working-dir
@pristavu
pristavu / init.vim
Created April 28, 2020 00:02 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@pristavu
pristavu / EloquentCheatSheet.md
Created March 31, 2020 02:41 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet
@pristavu
pristavu / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created March 13, 2020 17:01 — forked from Brainiarc7/ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@pristavu
pristavu / README.md
Created May 30, 2019 00:46 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@pristavu
pristavu / beautifier.js
Created April 17, 2019 21:54 — forked from fzldn/beautifier.js
VS Code Laravel Blade formatter using extension Beautify 1.4.11 by HookyQR with js-beautify hacks
...
Beautifier.prototype.beautify = function() {
...
var source_text = this._source_text;
// BEGIN
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {