- http://blog.getspool.com/2011/11/29/fast-easy-realtime-metrics-using-redis-bitmaps/
- https://github.com/eric/metriks
- http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
- http://unwiredcouch.com/2012/09/15/getting-started-with-monitoring.html
- https://github.com/ripienaar/gdash
- https://github.com/paulasmuth/fnordmetric
- http://railscasts.com/episodes/378-fnordmetric
- http://bost.ocks.org/mike/
- https://github.com/mbostock/d3
- http://www.confreaks.com/videos/655-rubyconf2011-big-data-enterprisy-analytics-app-and-ruby
View .gitignore
.DS_Store | |
*.swp | |
*.swo | |
Gemfile.lock |
View gist:3690516
View gist:3750231
Why I don't use...
I'm numbering my arguments just to be able to reference them. Order does not reflect priority.
jQuery
-
It's monolithic.
-
It's huge, both in terms of complexity and in resulting file size.
View _utils.bash
# _utils.sh --- Utilities used across all the scripts. | |
set -e | |
set -o pipefail | |
# Prints spaces as a prefix to the command's output. | |
function prefixed { | |
sed -e "s/^/ /" | |
} |
View script.sh
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Taken from https://dev.to/thiht/shell-scripts-matter | |
#/ Usage: | |
#/ Description: | |
#/ Examples: | |
#/ Options: |
View simple-linear-regression.rb
class SimpleLinearRegression | |
def initialize(xs, ys) | |
@xs, @ys = xs, ys | |
if @xs.length != @ys.length | |
raise "Unbalanced data. xs need to be same length as ys" | |
end | |
end | |
def y_intercept | |
mean(@ys) - (slope * mean(@xs)) |
View deploy.rb
set :path_to_repo, "/path_to_repo/" | |
set :running_app_user, "appusername" | |
namespace :webscale do | |
desc "Cache a signed out version of the path. Usage: cap webscale:signed_out_cache_page -s path_to_cache=/films/on_netflix" | |
task :signed_out_cache, roles: :app do | |
cache_base_path = "#{path_to_repo}/public/signed_out" | |
cached_destination_path = "#{cache_base_path}#{path_to_cache}.html" | |
working_path = "#{cached_destination_path}.tmp" |
View upgrade.md
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new
project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Bump your phoenix dep
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs
:
View compressed.rb
require 'zlib' | |
class CompressedString < String | |
def mongoize | |
BSON::Binary.new(Zlib::Deflate.deflate(self)) | |
end | |
class << self | |
# Get the object as it was stored in the database, and instantiate | |
# this custom class from it. |
View deploy.rake
require 'fileutils' | |
# Warning: The following deploy task will completely overwrite whatever is currently deployed to Heroku. | |
# The deploy branch is rebased onto master, so the push needs to be forced. | |
desc "Deploy app to Heroku after precompiling assets" | |
task :deploy do | |
deploy_branch = 'heroku' | |
remote = 'heroku' | |
deploy_repo_dir = "tmp/heroku_deploy" |
OlderNewer