Skip to content

Instantly share code, notes, and snippets.

View mayeaux's full-sized avatar
💭
Coding

Anthony mayeaux

💭
Coding
View GitHub Profile
@scripting
scripting / config.json
Last active November 1, 2016 15:55
An example config.json file that specifies a set of panels on your River5 installation's home page.
{
"maxRiverItems": 300,
"flAddItemsFromNewSubs": false,
"homePage": {
"panels": [
{
"title": "Dave",
"river": "iowa.js"
},
{
@pablote
pablote / install-nginx-rtmp.sh
Last active September 17, 2020 20:06
Install nginx, nginx-rtmp-module and a nodejs app that receives callbacks in a test VM
#!/bin/bash -x
export nginx_version=1.9.9
# get latest rtmp mod
mkdir /usr/local/src
cd /usr/local/src
git clone git://github.com/arut/nginx-rtmp-module.git
# get nginx
wget http://nginx.org/download/nginx-${nginx_version}.tar.gz
@jpopesculian
jpopesculian / webrtc-options.md
Created January 25, 2016 21:31
Large Scale WebRTC Broadcast

Large Scale WebRTC Broadcast

The Problem

WebRTC is a protocol that has been standardized in recent years among major browsers like Chrome, Firefox, Opera and the Android Browsers. Plugins/Native Implementations are available on IE/Edge/Safari and iOS/Android basically providing a relatively global protocol for real time media streams. However WebRTC is a P2P protocol which means that if a user wishes to broadcast his/her video to multiple users he/she needs to individually send that broadcast to each participant. This works on a small scale, but degrades quickly on a large scale due to bandwidth deterioration.

The Solution

One possible solution is to let the user stream his/her media to a server and the server in turn splits the media streams to the subscribers. There are two technical ways to do this. A Selective Forwarding Unit (SFU) which simply forwards streams, and a Multipoint Control Unit (MCU) which essentially does the same thing but lowers bandwidth usage by packaging streams together.

@ThatCheck
ThatCheck / webstorm-eslint-fix
Created January 11, 2016 16:40
Add command to run eslint --fix on webstorm (or any jetbrains IDE like phpStorm)
parameter:
--fix "$FilePath$"
Working Directory:
$ProjectFileDir$
To configure go to : File => Settings => Tools => External Tools
@max-mapper
max-mapper / index.html
Last active March 28, 2020 01:42
play webm video from binary webm data
<body style="width:500px; height:500px;">
<video controls></video>
<script src="index.js"></script>
</body>
@epcim
epcim / action_gnutls_scripted.md
Last active February 3, 2024 18:50
gnutls certtool ssl tls openssl

CA - based on gnutls-bin


this directory holds CA key + wildcard certificates created for new infrastructure the CA key/cert is "ca-cert.pem/key"

TODO:

  • create scripts to re-generate client certificates based on NEW CA
  • develop procedure to generate client/server certs from template (partialy done)
  • develop procedure to generate clr files + revocate certificate + distribute them on public places
@dead-claudia
dead-claudia / LICENSE.md
Last active December 11, 2015 11:58
Monadified error-first callbacks in LiveScript, inspired by JS's async-await proposal. Version in JS is for speed.

Copyright (c) 2015, Isiah Meadows

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

@jhnns
jhnns / git-pr
Last active March 15, 2021 07:50
Git custom command to quickly checkout pull-requests from different origins as described in https://help.github.com/articles/checking-out-pull-requests-locally. Place this file somewhere in your path and git will run it everytime you type `git pr ...`
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: git pr [clean] [<remote>] <id-or-url>"
echo ""
echo "Examples:"
echo "git pr 42 --> git fetch origin pull/42/head:pr/origin/42"
echo "git pr upstream 42 --> git fetch upstream pull/42/head:pr/upstream/42"
echo "git pr https://github.com/peerigon/phridge/pull/1 --> git fetch https://github.com/peerigon/phridge.git pull/1/head:pr/peerigon/phridge/1"
echo "git pr clean --> Deletes all branches that match pr/*/* and pr/*/*/*"
@amiller
amiller / lotto.sol
Created August 27, 2015 10:19
Illustration of the Ethereum call-stack hazard found in the wild
// Call stack hazards in Solidity!!
//
// This file is *slightly* modified relative to
// https://github.com/etherpot/contract/blob/f87501ddf319559346b2983b27770ace22771ad0/app/contracts/lotto.sol
// in order to demonstrate a flaw:
// Changes:
// - function () changed to function send()
// - function trigger() added
// - blocksPerRound changed from 6800 to 6
//
@piaoger
piaoger / setfiletime.js
Created August 24, 2015 03:40
Set file time in node.js
// set file add/mode time
var fs = require('fs')
function setFileTime(filePath, atime, mtime) {
fs.utimesSync(filePath, atime, mtime);
}
var date = new Date('Thu Aug 20 2015 15:10:36 GMT+0800 (CST)');
setFileTime('/tmp/scache/fdf/admin.log', date, date);