Skip to content

Instantly share code, notes, and snippets.

View stecman's full-sized avatar

Stephen Holdaway stecman

View GitHub Profile
@CharlesHolbrow
CharlesHolbrow / ffmpeg-hls.html
Created September 13, 2018 22:44
Example of ffmpeg for live hls streaming with hls.js
<!DOCTYPE html>
<html lang='`en'>
<head>
<meta charset='utf-8'/>
<title>Audio only stream example</title>
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script>
<style>
video {
width: 640px;
height: 360px;

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@allenwb
allenwb / 0Option2ConstructorSummary.md
Last active November 4, 2023 14:39
New ES6 constructor features and semantics: Alternative 2 manual super in derived classes

New ES6 Constructor Semantics and Usage Examples

Manual super: Alternative Design where subclass constructors do not automatically call superclass constructors

This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.

One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.

An alternative version of this design automatically invokes the base constructor in most situations.

@shamil
shamil / mount_qcow2.md
Last active October 14, 2024 05:37
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@stecman
stecman / README.md
Last active May 12, 2024 08:09
Pushover notification CLI script

Send Pushover notifications from the command line

Notify is a utility for sending push notifications via Pushover from the command line. It can be run manually, but is most useful for sending notifications from shell scripts, cron jobs, and long running tasks.

Pushover screenshot

Installation

To install, copy the contents of notify.php to somewhere on your computer, and make it executable:

@refiito
refiito / gist:9782982
Last active September 30, 2015 06:52
add zombies to toggl
var html = "<style>";
html += ".eye-holder{position:absolute;top:10px;left:10px;right:10px;bottom:10px;z-index:888;}.eyes{color:red;font-size:90px;position:absolute;font-family:Arial;font-weight:700;z-index:-1;-webkit-animation-duration:10s;-webkit-animation-timing-function:ease;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-duration:10s;-moz-animation-timing-function:ease;-moz-animation-iteration-count:infinite;-moz-animation-direction:normal;-o-animation-duration:10s;-o-animation-timing-function:ease;-o-animation-iteration-count:infinite;-o-animation-direction:normal;-ms-animation-duration:10s;-ms-animation-timing-function:ease;-ms-animation-iteration-count:infinite;-ms-animation-direction:normal;animation-duration:10s;animation-timing-function:ease;animation-iteration-count:infinite;animation-direction:normal}.eye-1{top:10px;left:6%;-webkit-animation-name:eyes_one;-moz-animation-name:eyes_one;-o-animation-name:eyes_one;-ms-animation-name:eyes_one;animation-name
@heptal
heptal / terminal_gif.md
Last active December 20, 2015 03:58
GIFs? In MY terminal?!

Video

Seems to run stable for hours!

If you can't see your cursor after killing it, run tput cnorm

Sometimes you may see a seq error if you run it multiple times with different resolutions in the same session. Easier to make a new session, or you can change it unset the variables used initially.

@pklaus
pklaus / ping.py
Created March 5, 2011 09:50
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping