Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # Rsync to remove old files | |
| gsutil -m rsync -x '.git*' -c -d -r dist gs://bucket/ | |
| # Upload and gzip HTML, CSS and JavaScript | |
| gsutil -m cp -z "html,css,js" -r dist/** gs://bucket/ | |
| # Set expires headers (6 months) on JS and CSS assets | |
| gsutil -m setmeta -h "Cache-Control: public, max-age=15552000" gs://bucket/assets/** | |
| # Make sure there's no expiration headers on HTML files |
| RESTORE=$(echo -en '\033[0m') | |
| RED=$(echo -en '\033[00;31m') | |
| GREEN=$(echo -en '\033[00;32m') | |
| YELLOW=$(echo -en '\033[00;33m') | |
| BLUE=$(echo -en '\033[00;34m') | |
| MAGENTA=$(echo -en '\033[00;35m') | |
| PURPLE=$(echo -en '\033[00;35m') | |
| CYAN=$(echo -en '\033[00;36m') | |
| LIGHTGRAY=$(echo -en '\033[00;37m') | |
| LRED=$(echo -en '\033[01;31m') |
| /** | |
| * Fetching data from BigQuery and present it in our sheet | |
| * Author: Ido Green | |
| * Date: 14/12/2013 | |
| * | |
| * See: http://wp.me/pB1lQ-19i | |
| * Misc: https://developers.google.com/bigquery/ | |
| */ | |
| // |
| user nobody; | |
| worker_processes 1; | |
| #pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| # This file should be placed at /etc/logrotate.d/ | |
| /srv/*/shared/log/*.log { | |
| daily | |
| missingok | |
| dateext | |
| rotate 30 # amount of days to keep compressed logs (you should backup it up externally) | |
| compress | |
| delaycompress | |
| notifempty |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| def tip(msg); puts; puts msg; puts "-"*100; end | |
| # | |
| # 30 Ruby 1.9 Tips, Tricks & Features: | |
| # http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
| # | |
| tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
| tip "Ruby 1.9 supports named captures in regular expressions!" |
| By Klaus Wuestefeld | |
| 1) Torne-se excelente. | |
| Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
| querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
| anos numa faculdade ouvindo um professor falar sobre software q vc | |
| sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
| aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo | |
| aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |