-
Show all images docker images
-
Show all running containers docker ps
-
Show all running and stopped containers docker ps -a
-
Run an container
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/bash | |
| # Adicione um novo remote; pode chamá-lo de "upstream": | |
| git remote add upstream https://github.com/usuario/projeto.git | |
| # Obtenha todos os branches deste novo remote, | |
| # como o upstream/master por exemplo: | |
| git fetch upstream |
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
| # db/migrate/20101004063749_create_photos.rb | |
| class CreatePhotos < ActiveRecord::Migration | |
| def self.up | |
| create_table :photos do |t| | |
| t.string :name, :null => false | |
| t.binary :data, :null => false | |
| t.string :filename | |
| t.string :mime_type | |
| t.timestamps |
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
| http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
| http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
| #payload: [{"kind"=>"person"}] | |
| Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
| #data: {"interest"=>["music", "movies", "programming"]} | |
| Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
| Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
| Segment.where("jsonb_array_length(data->'interest') > 1") |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| //Estrutura base do nó. | |
| struct node | |
| { | |
| int nData; | |
| struct node *pLink; | |
| }; | |
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
| import { Component, OnInit } from '@angular/core'; | |
| import { WebRequestService } from '../services/web-request.service'; | |
| @Component({ | |
| selector: 'app-home-page', | |
| templateUrl: './home-page.component.html', | |
| styleUrls: ['./home-page.component.scss'] | |
| }) | |
| export class HomePageComponent implements OnInit { |
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
| import { Injectable } from '@angular/core'; | |
| import { HttpClient } from '@angular/common/http'; | |
| import { Observable } from 'rxjs'; | |
| import { timeout } from 'rxjs/operators'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class WebRequestService { |
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
| <div class="container"> | |
| <div class="row mt-2"> | |
| <div class="col"> | |
| <div class="jumbotron"> | |
| <h3 class="text-center">{{msg}}</h3> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="row"> | |
| <div class="col text-center"> |
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
| import { NgModule } from '@angular/core'; | |
| import { Routes, RouterModule } from '@angular/router'; | |
| import { HomePageComponent } from './home-page/home-page.component'; | |
| const routes: Routes = [ | |
| { path: '', component: HomePageComponent }, | |
| { path: '**', redirectTo: '' } | |
| ]; | |
| @NgModule({ |
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
| /* | |
| * Convert from OpenCV image and write movie with FFmpeg | |
| * | |
| * Copyright (c) 2016 yohhoy | |
| */ | |
| #include <iostream> | |
| #include <vector> | |
| // FFmpeg | |
| extern "C" { | |
| #include <libavformat/avformat.h> |