Skip to content

Instantly share code, notes, and snippets.

Avatar

Raphael Rafatpanah persianturtle

View GitHub Profile
View app.scss
.App {
min-height: 100vh;
&:after {
content: '';
transition: opacity 450ms cubic-bezier(0.23, 1, 0.32, 1),
transform 0ms cubic-bezier(0.23, 1, 0.32, 1) 450ms;
position: fixed; top: 0; right: 0; bottom: 0; left: 0;
background-color: rgba(0, 0, 0, 0.33);
transform: translateX(-100%);
View app.re
[%bs.raw {|require('./app.css')|}];
type route =
| Home
| Page1
| Page2
| Page3;
type routeWithTitle = (route, string);
View app.re
[%bs.raw {|require('./app.css')|}];
let component = ReasonReact.statelessComponent("App");
let make = _children => {
...component,
render: _self => <div className="App" />
};
View index.re
[%bs.raw {|require('./index.css')|}];
[@bs.module "./registerServiceWorker"] external register_service_worker : unit => unit = "default";
ReactDOMRe.renderToElementWithId(<App />, "root");
register_service_worker();
View hackathon
import React, { PropTypes, Component } from 'react';
import ApolloClient, { createNetworkInterface } from 'apollo-client';
import { ApolloProvider } from 'react-apollo';
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import './App.css';
import BookSearch from './BookSearch';
import BookDetails from './BookDetails';
import GoogleMap from 'google-map-react';
@persianturtle
persianturtle / ffmpeg
Last active Jan 10, 2017
List of useful ffmpeg commands
View ffmpeg
// Convert 4444/422 to WEBM
ffmpeg -i input.mov -c:v libvpx -qmin 0 -qmax 25 -crf 4 -b:v 1M -vf scale=1280:-2 -an -threads 0 output.webm
// Enable audio
ffmpeg -i input.mov -c:v libvpx -qmin 0 -qmax 25 -crf 4 -b:v 1M -threads 0 output.webm
// Convert 4444/422 to WEBM - Smaller bitrate
ffmpeg -i input.mov -c:v libvpx -qmin 0 -qmax 25 -crf 4 -b:v 256k -vf scale=1280:-2 -an -threads 0 output.webm
@persianturtle
persianturtle / PhantomJS Screen Capture Script
Last active May 17, 2016
This script screenshots an array of URLs against an array of viewports after dynamically scrolling through the entire page using jQuery.
View PhantomJS Screen Capture Script
'use strict';
var page = require('webpage').create();
var loadInProgress = false;
var pageIndex = 0;
var viewportIndex = 0;
var urls = [
'https://google.com',
'https://kokorugs.com'