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
# Command Enhancements | |
# Utility | |
alias reload='source ~/bin/dotfiles/bash/aliases' | |
alias ea='mate -w ~/bin/dotfiles/bash/aliases && reload' # Edit aliases | |
alias ee="mate ~/bin/dotfiles/bash/env" | |
alias eb="mate ~/bin" | |
# Quicker cd | |
alias cg='cd /Library/Ruby/Gems/1.8/gems/' |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'pg' | |
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
» more /Users/tom/Library/Logs/Homebrew/mapnik/config.log | |
file /private/tmp/mapnik-e1l3/mapnik-v2.2.0/SConstruct,line 1032: | |
Configure(confdir = .sconf_temp) | |
scons: Configure: Checking for freetype-config... | |
freetype-config --libs --cflags | |
-I/usr/local/Cellar/freetype/2.5.1/include/freetype2 | |
-L/usr/local/Cellar/freetype/2.5.1/lib -lfreetype -lz -lbz2 -lpng15 | |
scons: Configure: yes | |
scons: Configure: Checking for xml2-config... |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
# Based on instructions from: | |
# http://steveko.wordpress.com/2013/09/11/terrain-in-tilemill-a-walkthrough-for-non-gis-types/ | |
# | |
# Further reading: | |
# https://www.mapbox.com/tilemill/docs/guides/terrain-data/ | |
# https://www.mapbox.com/blog/tilemill-raster-colorizer/ | |
# https://www.mapbox.com/tilemill/docs/guides/optimizing-shapefiles/ |
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
((window.devicePixelRatio || 1) * Math.max(window.outerWidth / window.innerWidth, 1)).toFixed(3) * 1 |
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
# node modules | |
fs = require 'fs' | |
path = require 'path' | |
url = require 'url' | |
browserSync = require 'browser-sync' | |
browserify = require 'browserify' | |
watchify = require 'watchify' | |
source = require 'vinyl-source-stream' | |
del = require 'del' |
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
perf = window.performance || Date | |
class Resizer | |
constructor: (srcImg, @options = {}) -> | |
if typeof srcImg == 'string' | |
@loadImage(srcImg) | |
if srcImg.toString().indexOf('Blob') > -1 |
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
'use strict'; | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const npmPackage = require('./package.json'); | |
const host = '0.0.0.0'; | |
const port = 3000; | |
const config = { | |
entry: [ | |
'babel-polyfill', |
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
{ | |
"name": "test-app", | |
"version": "0.0.1", | |
"description": "Test App", | |
"main": "index.js", | |
"scripts": { | |
"start": "clear && NODE_ENV=development webpack-dev-server --config webpack-dev.js --devtool cheap-module-source-map --inline --hot", | |
"test": "clear && watch 'npm run --silent mocha' ./src -d -u", | |
"mocha": "clear && mocha --opts mocha.opts ./src/**/*-test.js", | |
}, |
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
'use strict'; | |
/* eslint "react/prop-types": 0 */ | |
// import Immutable from 'immutable'; | |
import React, { PropTypes, Component } from 'react'; | |
import { Editor, EditorState, ContentState, RichUtils, convertFromHTML, convertFromRaw } from 'draft-js'; | |
import { stateToHTML } from 'draft-js-export-html'; | |
// based on this example: | |
// https://github.com/facebook/draft-js/tree/master/examples/rich |
OlderNewer