Skip to content

Instantly share code, notes, and snippets.

View fforres's full-sized avatar
🔥

Felipe Torres (fforres) fforres

🔥
View GitHub Profile
class Video extends React.Component {
static defaultProps = {
autoPlay: false,
maxLoops: 10,
}
static propTypes = {
autoPlay: React.PropTypes.bool.isRequired,
maxLoops: React.PropTypes.number.isRequired,
posterFrameSrc: React.PropTypes.string.isRequired,
videoSrc: React.PropTypes.string.isRequired,
class Video extends React.Component {
static defaultProps = {
autoPlay: false,
maxLoops: 10,
}
static propTypes = {
autoPlay: React.PropTypes.bool.isRequired,
maxLoops: React.PropTypes.number.isRequired,
posterFrameSrc: React.PropTypes.string.isRequired,
videoSrc: React.PropTypes.string.isRequired,
@fforres
fforres / webvr.md
Created July 2, 2017 23:33
Web VR talk description (outline)
  • What is VR
    • What’s all the Fuzz with VR
    • It’s Past (Is it reeeeally tahat new?)
    • Who is spearheading WebVR?
    • It’s Present (Where are we now)
  • WebVR
    • Current State
    • Support
    • What can we do (Cool demos)
  • Mini Demo 1
....................../´¯/)
....................,/¯../
.................../..../
............./´¯/'...'/´¯¯`·¸
........../'/.../..../......./¨¯\
........('(...´...´.... ¯~/'...')
.........\.................'...../
..........''...\.......... _.·´
............\..............(
..............\.............\...
@fforres
fforres / .zshrc
Last active July 17, 2019 18:06
ZSHRC file with antigen
source $HOME/antigen.zsh
source $HOME/dev/src/github.com/segmentio/dotfiles/index.sh
DISABLE_UNTRACKED_FILES_DIRTY="true"
ENABLE_CORRECTION="false"
export SEGMENT_TEAM="app"
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
@fforres
fforres / .gitignore
Last active March 3, 2018 23:39
New nodejs projects setup
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
@fforres
fforres / index.js
Last active May 8, 2018 07:03
lambda self-updating function
var AWS = require("aws-sdk");
var accessKeyId = process.env.accessKeyId;
var secretAccessKey = process.env.secretAccessKey;
var currentTS = Number(process.env.currentTS);
var lambda = new AWS.Lambda({
accessKeyId,
secretAccessKey,
region: "us-east-1"
});
@fforres
fforres / enrichment.test.ts
Created December 6, 2018 21:25
Middleware
import 'jest'
import { enrichment, IEnrichmentRequest } from '../../src/middlewares/enrichment'
import { mockReq, mockRes } from 'sinon-express-mock'
import * as sinon from 'sinon'
const enrichmentMiddleware = enrichment()
jest.mock('../../src/middlewares/enrichment/api.ts')
let req: IEnrichmentRequest
let res
import puppeteer from "puppeteer"
async function generatePdf(htmlContent) {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
await page.setContent(htmlContent);
const pdf = await page.pdf({ format: 'A4' });
const pdfBuffer = await page.pdf();
await page.close();
await browser.close();
const IssueCardWizardInternal = () => {
// many things happen here
return <SomeComponent />
}
// Wrap your component like this 👇
export default IssueCardWizardInternal