Install Golang 1.9:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
If already installed old golang with apt-get:
| #!/bin/bash | |
| git branch -D gh-pages | |
| git push origin --delete gh-pages | |
| git checkout -b gh-pages | |
| ionic build --prod | |
| find . -type d ! -path './www*' ! -path './.git*' ! -path '.' | xargs rm -rf | |
| rm -r *.* | |
| mv www/* . | |
| rm -rf www | |
| git add . |
| import os | |
| from time import sleep | |
| path = os.getcwd() | |
| files = os.listdir(path) | |
| #install package | |
| os.system('sudo apt install calibre -y && sudo apt update') | |
| #remove espacos e insere _ |
| # See list of docker virtual machines on the local box | |
| $ docker-machine ls | |
| NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS | |
| default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1 | |
| # Note the host URL 192.168.99.100 - it will be used later! | |
| # Build an image from current folder under given image name | |
| $ docker build -t gleb/demo-app . |
| #!/usr/bin/env bash | |
| # https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce | |
| # https://docs.docker.com/compose/install/ |
| # encoding: utf-8 | |
| # Be sure to restart your server when you modify this file. | |
| # Add new inflection rules using the following format | |
| # (all these examples are active by default): | |
| # ActiveSupport::Inflector.inflections do |inflect| | |
| # inflect.plural /^(ox)$/i, '\1en' | |
| # inflect.singular /^(ox)en/i, '\1' | |
| # inflect.irregular 'person', 'people' | |
| # inflect.uncountable %w( fish sheep ) |
Install Golang 1.9:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
If already installed old golang with apt-get:
| $ sudo apt-get install wget | |
| $ sudo apt-get install build-essential | |
| $ sudo apt-get install libc6-dev | |
| $ wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.27.tar.gz | |
| $ tar -xzf freetds-1.00.27.tar.gz | |
| $ cd freetds-1.00.27 | |
| $ ./configure --prefix=/usr/local --with-tdsver=7.3 | |
| $ make | |
| $ make install |
| # Launch Pry with access to the entire Rails stack. | |
| # If you have Pry in your Gemfile, you can pass: ./script/console --irb=pry | |
| # instead. If you don't, you can load it through the lines below :) | |
| rails = File.join(Dir.getwd, 'config', 'environment.rb') | |
| if File.exist?(rails) && ENV['SKIP_RAILS'].nil? | |
| require rails | |
| if Rails.version[0..0] == '2' | |
| require 'console_app' |
Just like how we use Git to version control source code, we use migrations to manage the state of our database schemas.
Imagine you're working on project with another developer, and you're both tasked with creating a specific part of an event planning application. Let's say you are in charge of creating the Users and your friend is going to create the Events.
Let's say you and your friend divided the work in a way so that neither of you will have to to use each other's code to finish your tasks. While you're working on your part of the application, you only really need to touch the Users table when you are working with the database.
Make sure that the project you are in is a node project (it has a package.json) and you have already installed and initialized sequelize (npm install --save sequelize, sequelize init). Also make sure that your config.json file has the correct credentials to connect to your database.