Skip to content

Instantly share code, notes, and snippets.

💭
over the sky

Erik Sanchez eriksape

View GitHub Profile
@eriksape
eriksape / fixBrokenHTMLString.php
Created Aug 14, 2018 — forked from joshmfrankel/fixBrokenHTMLString.php
PHP: Fix broken html tags in string and use html entities
View fixBrokenHTMLString.php
/**
* Fix for broken html tags inside strings for php.
*
* By using passing the html through DOMDocument and converting the html
* entities we are left with beautiful well formatted code. Huzzah!
*
* "Nothing is ever easy" -Zedd, Wizards First Rule
*
* @var DOMDocument
*/
@eriksape
eriksape / readme.md
Created Feb 8, 2018 — forked from maxogden/readme.md
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
View readme.md
  1. compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
  2. create youtube 'live event'. get rtmp url + session id
  3. run this:
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>

you can tweak -b and -fps to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera

View react page.js
/*
* main application
*/
import React from 'react'
import ReactDOM from 'react-dom'
import page from 'page'
/* Component */
@eriksape
eriksape / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.