These instructions install ruby and rubygems from source, not from RPMs. For instructions on installing from RPMs, look at something like http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs or http://mykestubbs.com/blog/2010/03/chef-installation-on-centos-54.html
This file contains hidden or 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 CreateModels < ActiveRecord::Migration | |
def change | |
create_table :models do |t| | |
t.binary :extras | |
t.timestamps | |
end | |
end | |
end |
This file contains hidden or 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
var time_ago_in_words = function(from, to) { | |
to = to ? to : Date.now(); | |
var minutes = (to - from) / 60000; | |
var data = [ | |
[0 , 'less than a minute ago'], | |
[1 , 'a minute ago'], | |
[2 , function(m) {return m.toFixed() + ' minutes ago';}], | |
[45 , 'about 1 hour ago'], |
See also: NZ_TV_streams.md
mpv <stream> --http-header-fields "X-Forwarded-For: 110.33.122.75"
This file contains hidden or 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
require 'ansi' | |
require 'sqlite3' | |
require 'active_record' | |
require 'elasticsearch/model' | |
ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) | |
ActiveRecord::Base.establish_connection( adapter: 'sqlite3', database: ":memory:" ) | |
ActiveRecord::Schema.define(version: 1) do | |
create_table :articles do |t| |
This file contains hidden or 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
FROM elixir:1.4.5 as asset-builder-mix-getter | |
ENV HOME=/opt/app | |
RUN mix do local.hex --force, local.rebar --force | |
# Cache elixir deps | |
COPY config/ $HOME/config/ | |
COPY mix.exs mix.lock $HOME/ | |
COPY apps/myproject_web/mix.exs $HOME/apps/myproject_web/ | |
COPY apps/myproject_web/config/ $HOME/apps/myproject_web/config/ |