1 week ago | 1 week ago + 1 hour |
Now | In 1 hour (Prediction) |
|
---|---|---|---|---|
Avg CPU avg_cpu |
50% | 45% | 52% | |
Num Nodes nodes |
2 | 4 | 2 | |
See if the present is matching the past | ||||
Total CPUtotal_cpu = avg_cpu * nodes |
100 | 104 | ||
100 and 104 are close enough together to assume that the future will match the past | ||||
Calculate total cpu for 1w ago + 1h |
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
class AwsController < ApplicationController | |
def call | |
service = AWS.const_get(params[:service]).new(params[:service_params] || {}) | |
result = service.client.send(params[:method].to_sym, params[:options] || {}) | |
respond_to do |format| | |
format.json { render :json => result.data } | |
end | |
end | |
end |
programStations is an Ember.ArrayController
console.log programStations.mapProperty('id')
programStations.forEach (programStation, index) ->
console.log "#{index}: #{programStation.get 'id'}
outputs:
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
class GraphiteUrl | |
constructor: (base, attrs = {}) -> | |
@base = base | |
@attrs = attrs | |
@targets = [] | |
attr: (k, v) -> | |
@attrs[k] = v | |
target: (target) -> |
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
RUBY_GC_MALLOC_LIMIT=1000000000 | |
RUBY_HEAP_FREE_MIN=500000 | |
RUBY_HEAP_MIN_SLOTS=1000000 | |
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
RUBY_HEAP_SLOTS_INCREMENT=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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<xml> | |
<result> | |
<ui_conf> | |
<id>1103</id> | |
<partnerId>0</partnerId> | |
<objType>5</objType> | |
<objTypeAsString>Playlist</objTypeAsString> | |
<name>kupload 1.0.7</name> | |
<swfUrl>https://www.instructuremedia.com/flash/kupload/v1.1.7/KUpload.swf</swfUrl> |
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
## | |
# replaces :blah: with an image with the appropriate emoji | |
all_emojis = [ | |
'+1', '-1', '100', '1234', '8ball', 'a', 'ab', 'abc', 'abcd', 'accept', | |
'aerial_tramway', 'airplane', 'alarm_clock', 'alien', 'ambulance', 'anchor', | |
'angel', 'anger', 'angry', 'anguished', 'ant', 'apple', 'aquarius', 'aries', | |
'arrow_backward', 'arrow_double_down', 'arrow_double_up', 'arrow_down', | |
'arrow_down_small', 'arrow_forward', 'arrow_heading_down', | |
'arrow_heading_up', 'arrow_left', 'arrow_lower_left', 'arrow_lower_right', |
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
class GitHub::Markdown | |
class << self | |
alias_method :old_render, :render | |
def render(content) | |
render_gfm(content) | |
end | |
end | |
end |
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 'rubygems' | |
require 'highline' | |
def ask(question) | |
HighLine.new.ask(question) | |
end | |
def ask_secure(question) |