(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # HTTPS server | |
| server { | |
| listen 80 443 ssl spdy; | |
| server_name www.cvlayer.com; | |
| ssl_certificate /etc/nginx/cert/chain.crt; | |
| ssl_certificate_key /etc/nginx/cert/certificate.key; | |
| add_header Strict-Transport-Security "max-age=31536000"; | |
| return 301 https://cvlayer.com$request_uri; | |
| } | |
| server { |
| RUBY_GC_HEAP_FREE_SLOTS: 600000 | |
| RUBY_GC_HEAP_GROWTH_FACTOR: 1.25 | |
| RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 200000 | |
| RUBY_GC_HEAP_INIT_SLOTS: 600000 | |
| RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.3 | |
| RUBY_GC_MALLOC_LIMIT: 16000000 | |
| RUBY_GC_MALLOC_LIMIT_MAX: 32000000 | |
| RUBY_GC_OLDMALLOC_LIMIT: 16000000 | |
| RUBY_GC_OLDMALLOC_LIMIT_MAX: 32000000 |
| /** | |
| * ArcUtils.java | |
| * Copyright (c) 2014 BioWink GmbH. All rights reserved. | |
| **/ | |
| /** | |
| * Proper Java code style formatting | |
| * Copyright (c) 2014 Sebastiano Poggi. Do whatever you want with this code. | |
| */ |
| check process sidekiq_01 | |
| with pidfile /path/to/app/current/tmp/pids/sidekiq.pid | |
| start program = "/bin/sh -c 'cd /path/to/app/current; PATH=bin:/path/to/rbenv/shims:/path/to/rbenv/bin:$PATH nohup bundle exec sidekiq -e production -i 0 -P tmp/pids/sidekiq.pid >> log/sidekiq.log 2>&1 &'" as uid app_user and gid app_group with timeout 90 seconds | |
| stop program = "/bin/sh -c 'cd /path/to/app/current; PATH=bin:/path/to/rbenv/shims:/path/to/rbenv/bin:$PATH bundle exec sidekiqctl stop tmp/pids/sidekiq.pid'" as uid app_user and gid app_group with timeout 90 seconds | |
| if totalmem is greater than 500 MB for 2 cycles then restart # eating up memory? | |
| group sidekiq | |
| check process sidekiq_02 | |
| with pidfile /path/to/app/current/tmp/pids/sidekiq.pid-1 | |
| start program = "/bin/sh -c 'cd /path/to/app/current; PATH=bin:/path/to/rbenv/shims:/path/to/rbenv/bin:$PATH nohup bundle exec sidekiq -e production -i 1 -P tmp/pids/sidekiq.pid-1 >> log/sidekiq.log 2>&1 &'" as uid app_user and gid app_group with timeout 90 seconds |
| #!/bin/bash | |
| function usage() { | |
| echo "Usage: $0 <playlist-id>" | |
| exit 1 | |
| } | |
| function download() { | |
| local tempfile=`tempfile` || usage | |
| local formated_tempfile=`tempfile` || usage | |
| curl -s "https://gdata.youtube.com/feeds/api/playlists/$1?max-results=$2&start-index=$3" > $tempfile | |
| xmllint --format $tempfile > $formated_tempfile |
sudo apt-get install golang git mercurial git clone https://github.com/hanwen/go-mtpfs.git cd go-mtpfs go build sudo mv go-mtpfs /usr/local/sbin/go-mtpfs sudo chmod a+x /usr/local/sbin/go-mtpfs sudo mkdir /media/mtp sudo chmod 775 /media/mtp sudo /usr/local/sbin/go-mtpfs -allow-other=true /media/mtp
| # to store in ./config | |
| index: | |
| analysis: | |
| analyzer: | |
| full_text_analyzer: | |
| type: custom | |
| tokenizer: standard | |
| filter: [standard, lowercase, asciifolding] | |
| partial_text_analyzer : | |
| type : custom |