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
| # Create groups | |
| sudo groupadd www-data | |
| # Add users to group | |
| sudo usermod -a -G www-data $(whoami) | |
| sudo usermod -a -G www-data root | |
| # Add users to www-data | |
| sudo usermod -a -G www-data root |
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
| #!/bin/env ruby | |
| # lazy hack from Robert Klemme | |
| module Memory | |
| # sizes are guessed, I was too lazy to look | |
| # them up and then they are also platform | |
| # dependent | |
| REF_SIZE = 4 # ? | |
| OBJ_OVERHEAD = 4 # ? |
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
| # DUMP | |
| pg_dump dbname > outfile | |
| # RESTORE DUMP | |
| psql dbname < infile | |
| # CREATE DB | |
| createdb [connection-option...] [option...] [dbname] [description] | |
| # DROP DB |
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
| # Vai até a respectiva branch | |
| git checkout dest-branch | |
| # Puxa todas as alterações do git | |
| git fetch --all | |
| # Reseta a branch para a master | |
| git reset --hard origin/master | |
| # Faz merge com sua branch |
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 python:3.4-alpine | |
| MAINTAINER André Leoni <andreluizleoni@gmail.com> | |
| RUN apk add --update \ | |
| python \ | |
| python-dev \ | |
| py-pip \ | |
| build-base \ | |
| libpng \ |
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
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) | |
| #Clear all volumes | |
| docker volume rm $(docker volume ls -qf dangling=true) | |
| # QQQQQQ | |
| docker rm $(docker ps -q -f 'status=exited') | |
| docker rmi $(docker images -q -f "dangling=true") |
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
| JS_PATH = "app/assets/javascripts/**/*.js"; | |
| Dir[JS_PATH].each do |file_name| | |
| puts "\n#{file_name}" | |
| puts Uglifier.compile(File.read(file_name)) | |
| 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
| bundle check || bundle install | |
| bundle exec puma -C config/puma.rb |
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
| bundle exec sidekiq -q JOB_QUEUE |
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
| version: '2' | |
| services: | |
| postgres: | |
| image: 'postgres:9.5' | |
| volumes: | |
| - 'postgres:/var/lib/postgresql/data' | |
| redis: | |
| image: 'redis:3.2-alpine' |