Follow those steps to install OpenProject on a fresh uberspace.
First we set-up all dependencies. We use ruby 2.1.2
and install gems in a user directory:
echo "gem: --user-install --no-rdoc --no-ri" > ~/.gemrc
cat <<'EOF' >> ~/.bash_profile
Follow those steps to install OpenProject on a fresh uberspace.
First we set-up all dependencies. We use ruby 2.1.2
and install gems in a user directory:
echo "gem: --user-install --no-rdoc --no-ri" > ~/.gemrc
cat <<'EOF' >> ~/.bash_profile
class ByteArray | |
include Enumerable | |
def initialize(n) | |
@size = n | |
@char_count = (n / 8.0).ceil | |
@store = String.new("\0" * @char_count, encoding: "ASCII-8BIT") | |
end | |
def [](n) |
Uberspace (an awesome german web hoster) has superb postgresql support, except that it currently only offers postgresql versions 9.2.x
and 9.3.x
. I run postgresql 9.6.2
on my uberspace and documented steps for a migration to postgresql 9.6
here.
My goal was to be as close to the original uberspace-postgresql-setup as possible, but I had to copy and modify some uberspace scripts so they correctly use the new postgresql version.
Warning: Here be dragons. This is what I did -- that doesn't mean you should do the same or what I did was clever. Always backup your data and maybe test on a throw-away uberspace first. If you find things to improve, let me know and I'll try to keep this updated.
[alias] | |
lg = log -G --pager always --color always --template '\033[0;31m{node|short} \033[0;34m({author|person}) - \033[0;33m{tags} {bookmarks} {branches} \033[0m{desc|firstline|strip} \033[0;32m({date|age})\033[0m\n' | |
show = log -pr | |
chp = graft | |
shortlog = !hg log --template "{author|person}\n" | sort | uniq -c | sort -nr |
#!/bin/sh | |
set -e | |
echo "this script installs openproject" | |
echo "things might take a while, please be patient" | |
echo "" | |
echo "setup environment..." | |
echo "gem: --user-install --no-rdoc --no-ri" > ~/.gemrc |
I hereby claim:
To claim this, I am signing this object:
require 'benchmark' | |
iterations = 10_000 | |
arr = Array.new(1000) { Array.new(2) << (rand()*100).to_s} | |
def use_map_join(arr) | |
arr.map {|a| a[2]}.join ', ' | |
end | |
def use_inject(arr) | |
join_str = ', ' |
ruby --version | |
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] | |
ruby bench.rb | |
user system total real | |
babai1 1.700000 0.000000 1.700000 ( 1.707292) | |
babai2 29.630000 0.010000 29.640000 ( 29.769966) |
Entry = Struct.new(:timestamp, :clientID, :objectID, :size, :method, :status, :type, :server) do | |
REGIONS = [:SantaClara, :Plano, :Herndon, :Paris] | |
PROTOCOLS = [:HTTP_09, :HTTP_10, :HTTP_11, :HTTP_XX] | |
METHODS = [:get, :head, :post, :put, :delete, :trace, :options, :connect, :other] | |
STATUS_CODES = [100, 101, 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 500, 501, 502, 503, 504, 505, :other] | |
FILE_TYPES = [:html, :image, :audio, :video, :java, :formatted, :dynamic, :text, :compressed, :programs, :directory, :icl, :other] | |
def self.parse(bytes) | |
values = bytes.unpack("NNNNCCCC") | |
entry = self.new |
class SnakeHash < SimpleDelegator | |
def []=(arg1, arg2) | |
puts "!!1!" | |
@delegate_sd_obj[arg1] = arg2 | |
end | |
end | |
#[2] pry(main)> h = SnakeHash.new(Hash.new) | |
#=> {} | |
#[3] pry(main)> h[2] |