I hereby claim:
- I am tessi on github.
- I am tessi (https://keybase.io/tessi) on keybase.
- I have a public key ASCnhquaMtRQU8NfCVTGIGGkMe3JQBNsbSU26FjGtgJXlQo
To claim this, I am signing this object:
| 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) |
I hereby claim:
To claim this, I am signing this object:
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.
| #!/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 |
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
I hereby claim:
To claim this, I am signing this object:
| [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 |
| 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) |