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
# Copied from https://trac.ffmpeg.org/wiki/CompilationGuide/Centos | |
yum install -y autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel | |
mkdir ~/ffmpeg_sources | |
# NASM | |
cd ~/ffmpeg_sources | |
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 | |
tar xjvf nasm-2.13.02.tar.bz2 |
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
/** | |
* This component can truncate text AND HTML markup with ellipsis. | |
* Inspired by this github issue: https://github.com/One-com/react-truncate/issues/8#issuecomment-262639343 | |
* This component is not managed by react VDOM and mutates its own DOM | |
*/ | |
const Ellipsis = require('imports?self=>{}!ellipsis.js'); // shim `self` | |
import React, { Component } from 'react'; | |
class TruncateWithEllipsis extends Component { | |
configure() { |
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 | |
set -e | |
CURRENT_SESSION=${PWD##*/} | |
# Do we have rakefile in the directory? | |
if [ ! -f Rakefile ] | |
then | |
echo 'Rakefile not found in current directory' |
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
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
bind-key C-a last-window | |
set -g default-terminal "screen-256color" | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
set -g status on | |
set -g history-limit 1000000 |
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
AUTOMATION_SOURCE_DIR=./ | |
AUTOMATION_TEST_SOURCE_DIR=${AUTOMATION_SOURCE_DIR} | |
NODE_MODULES_DIR=node_modules/ | |
BUILD_DIR=./build/ | |
.PHONY: all test \ | |
copy_vendor_libs \ | |
build prep \ | |
clean |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Photos with Friends!</title> | |
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script> | |
<script> | |
/** | |
* This is the getPhoto library | |
*/ |
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
fs = require 'fs' | |
http = require 'http' | |
temp = require 'temp' # npm install | |
getTemporaryFilePathFromURL = ( url, callback ) -> | |
temp.open 'temp-image', (err, info) -> | |
stream = fs.createWriteStream info.path | |
http.get url, ( res ) -> | |
res.on 'data', (chunk) -> | |
console.log 'got chunk of size ' + chunk.length |
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
/** | |
* Usually shadowOffsetX and shadowOffsetY work as expected, but Android | |
* browser has a known issue where it inverts shadowOffsetY. | |
* (See http://code.google.com/p/android/issues/detail?id=16025) | |
* So, we test for it, creating an offset object for x and y | |
*/ | |
var shadowTransform = (function() { | |
// create a 3x3 canvas and put a 1px square in the middle | |
var canvas = document.createElement('canvas'); | |
canvas.height = canvas.width = 3; |
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
var filter = function(dest, src, w, h, filterSpecific) { | |
// HIPSTERHASHIT! | |
}; | |
var canvas = document.getElementById('canvas'); | |
var width = canvas.width; | |
var height = canvas.height; | |
var cc = canvas.getContext('2d'); |