This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { ReactDOM, Component, PropTypes } from 'react'; | |
import {render} from 'react-dom'; | |
import { Router, Route, Link, browserHistory} from 'react-router' | |
/** React router hello world example **/ | |
class App extends Component { | |
render() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec advpng -z4 {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum -y install gcc gcc-c++ kernel-devel | |
sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel | |
pip install cryptography |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby convert-to-ipad.rb video1.avi video2.avi video3.avi | |
# | |
# Prereq: brew install ffmpeg | |
ARGV.each do |input_file| | |
output_file = input_file.gsub('.avi', '.ipad.mp4') | |
cmd = "ffmpeg -i #{input_file} -acodec aac -ac 2 -strict experimental -ab 160k -s 1024x768 -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 #{output_file}" | |
puts cmd | |
system cmd | |
end |