Skip to content

Instantly share code, notes, and snippets.

over the sky

Erik Sanchez eriksape

over the sky
Block or report user

Report or block eriksape

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View custom-log.js
const { Writable } = require("stream");
const writableStreamLog = new Writable({
write(chunk, encoding, callback) {
const now = new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '');
process.stdout.write('------- Escuela de Javascript ----------\n');
process.stdout.write(`------- LOG ${now} --------\n`);
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 /
Created Feb 8, 2018 — forked from maxogden/
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
  1. compile ffmpeg for 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://<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 / 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.