start new:
tmux
start new with session name:
tmux new -s myname
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require "rvm/capistrano" | |
set :application, "my_app" | |
set :repository, "[email protected]:myuser/myapp.git" | |
set :branch, "production" | |
set :rvm_ruby_string, "1.9.2" | |
set :deploy_to, "/var/applications/" | |
set :user, "username" |
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: bluepill | |
# Required-Start: $local_fs $remote_fs $network $syslog $time | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: bluepill daemon, providing process monitoring | |
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill. |
Your challenge, should you accept it, is to write a Ruby library that will modify an existing program to output the number of times a specific method is called.
You solution library should be required at the top of the host program, or via ruby's -r flag (i.e. ruby -r ./solution.rb host_program.rb
).
Your solution library should read the environment variable COUNT_CALLS_TO
to determine the method it should count. Valid method signatures are Array#map!
, ActiveRecord::Base#find
, Base64.encode64
, etc.
Your solution library should count calls to that method, and print the method signature and the number of times it was called when the program exits.
Also, your solution should have a minimal impact on the program's running time. set_trace_func
is a no-go...
When receiving JSON data from other resources(server API etc), we need Json.Decode to convert the JSON values into Elm values. This gist let you quickly learn how to do that.
I like to follow working example code so this is how the boilerplate will look like:
import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=))
import Http
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex