Skip to content

Instantly share code, notes, and snippets.

View sgarbesi's full-sized avatar

Salvatore Garbesi sgarbesi

View GitHub Profile
@hwdsl2
hwdsl2 / .MOVED.md
Last active April 18, 2024 01:37
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@mharsch
mharsch / gist:5188206
Last active February 8, 2024 02:43
serve HLS (HTTP Live Streaming) content from node.js

HLS streaming from node

Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.

loosely based on https://gist.github.com/bnerd/2011232

// loosely based on https://gist.github.com/bnerd/2011232
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory
@DasLampe
DasLampe / imap-fsockopen.class.php
Last active March 5, 2024 06:30
A small IMAP class to connect via fsockopen with SSL. Helpful for e.g. gmail.com. (Be careful! Scripted in 2010)
<?php
// +----------------------------------------------------------------------+
// | Copyright (c) 2010 DasLampe <daslampe@lano-crew.org> |
// | Encoding: UTF-8 |
// +----------------------------------------------------------------------+
class IMAP
{
var $sock;
var $host;
var $port;