Skip to content

Instantly share code, notes, and snippets.

View oviniciusfeitosa's full-sized avatar
🧛

Vinícius Feitosa da Silva oviniciusfeitosa

🧛
View GitHub Profile
@oviniciusfeitosa
oviniciusfeitosa / GithubShortcuts.md
Created December 3, 2019 14:12
Github shortcuts

Shift + /

@oviniciusfeitosa
oviniciusfeitosa / Ubuntu - Allow SSH Server.md
Created November 27, 2019 21:13
Ubuntu - Allow SSH Server.md

Permitindo acesso SSH

SSH Server - Ubuntu

    sudo apt-get install openssh-server
    sudo service ssh status

    sudo adduser jenkins --ingroup docker
 #Abcd123456
@oviniciusfeitosa
oviniciusfeitosa / Docker Compose (docker-compose) auto scale.md
Created November 11, 2019 12:44
Docker Compose (docker-compose) auto scale.md

Docker Compose (docker-compose) auto scale

To specify how many containers to scale using docker-compose use the --scale service = {number} command. This command sets 5 containers for redis-service: docker-compose up -d --scale redis-service = 5

docker-compose -f docker-compose-scale.yml up -d --scale hello=5
@oviniciusfeitosa
oviniciusfeitosa / Git - Bypass proxy to specific host.md
Last active November 7, 2019 18:06
Git - Bypass proxy to specific host.md
  • Global
$ git config --global add remote.{remote_name} proxy 
  • Locally
$ git config --local --add remote.{remote_name}.proxy ""

Thanks Odilon

@oviniciusfeitosa
oviniciusfeitosa / SCP - copy host to client.md
Created November 1, 2019 21:32
SCP - copy host to client

SCP - copy host to client

scp -r user@host:/host/dir/ /my/local/folder

scp user@host:'/home/dir/*.{jpg,pdf}' /my/destination/local/folder
@oviniciusfeitosa
oviniciusfeitosa / Javascript execute callback.md
Created October 16, 2019 15:15
Javascript execute callback.md
function Thing(name) {
    this.name = name;
}
Thing.prototype.doSomething = function(callback) {
    callback.call(this);
}

function foo() {
 alert(this.name);
@oviniciusfeitosa
oviniciusfeitosa / vue 2 - Adding a new property to reactive object
Last active October 16, 2019 14:43
vue 2 - Adding a new property to reactive object
Vue.set(this.myObject, key, value)
@oviniciusfeitosa
oviniciusfeitosa / javascript validation group.md
Created October 14, 2019 20:35
javascript validation group.md

let conditionsArray = [ condition1, condition2, condition3, ]

if (conditionsArray.indexOf(false) === -1) { "do somthing" }

@oviniciusfeitosa
oviniciusfeitosa / Oliver Steele’s Nested Object Access Pattern
Created October 14, 2019 20:32
Oliver Steele’s Nested Object Access Pattern.md
Oliver Steele’s Nested Object Access Pattern
const name = ((user || {}).personalInfo || {}).name;