-
Install
colordiff
using Homebrew:brew install colordiff
-
Add function to your
~/.bash_profile
:
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
# gem "ruby-prof" | |
around_filter :profiler | |
def profiler(&block) | |
data = RubyProf::Profile.profile(&block) | |
filepath = Rails.root.join("tmp", "profiler.html") | |
File.open(filepath, "w") do |f| | |
RubyProf::CallStackPrinter.new(data).print(f) |
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
_.mixin({ | |
sum : function(data){ | |
return _.reduce(data, function(memo, num){ return memo + num; }, 0); | |
}, | |
mean : function(data){ | |
return this.sum(data)/data.length | |
}, | |
median : function(data){ | |
return this.percentile(data,50); | |
}, |
My first experiment with Mapbox GL is a mock up of what astronauts in the ISS could see out of their window.
This map let's you fly over the latitude parallel of your choice. You can change
- the baselayer (hybrid, streest of satellite)
- the parallel you are flying over (pan left or right)
- the zoom (+ and - in upper right corner)
- rotation of view (the compass in the upper right corner)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.