Skip to content

Instantly share code, notes, and snippets.


Erik Sanchez Pérez eriksape

View GitHub Profile
eriksape / init.el
Created Jun 20, 2022 — forked from Lukewh/init.el
20210215 - Emacs config for typescript and CRA
View init.el
'package-archives '(("org" . "")
("melpa" . "")
("gnu" . "")))
(unless (package-installed-p 'use-package)
(package-install 'use-package)))

Keybase proof

I hereby claim:

  • I am eriksape on github.
  • I am eriksape ( on keybase.
  • I have a public key whose fingerprint is 5382 1B06 96A1 8A64 DCAE 146C B947 9C8B 80D8 A593

To claim this, I am signing this object:

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