Skip to content

Instantly share code, notes, and snippets.

View durvalrafael's full-sized avatar

Durval Rafael durvalrafael

View GitHub Profile
@durvalrafael
durvalrafael / git.md
Created August 8, 2018 14:22
git useful

Store credentials (useful for https remote)

$ git config credential.helper store
@durvalrafael
durvalrafael / ubuntu.md
Last active March 30, 2018 14:18
Lista Ubuntu Theme

Ubuntu Workflow

Theming

  • Install gnome tweak (avaliable on Ubuntu Software)
  • Install Arc Theme at https://github.com/horst3180/arc-theme
  • Install GTK 3
    $ sudo apt-get install libgtk-3-dev
    
@durvalrafael
durvalrafael / README.MD
Created October 5, 2017 19:49
README Template
	# README Boilerplate

	A template of README best practices to make your README simple to understand and easy to use. 

	## Table of Contents

	- [Installation](#installation)
	- [Usage](#usage)
	- [Support](#support)
@durvalrafael
durvalrafael / Dockerfile
Created July 27, 2017 05:12
Dockerfile useful comands
FROM image[:tag] # Image that container will be up
RUN command # A bash script command
WORKDIR /app # Root Directory
COPY . /app # Copy current dir to inside container
VOLUME /app # Exposed volumes to outside container
EXPOSE 3000 # Exposed ports to outside container
CMD ["command", "args", ... ] # Run command after container`s up
@durvalrafael
durvalrafael / docker.sh
Created May 26, 2017 13:06
Docker: Remove all images and containers
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@durvalrafael
durvalrafael / arrowFunction.js
Created May 24, 2017 23:20
Exemplo de arrow function
class Teste {
constructor() {
this.init();
}
init(){
//Arrow Funcion
let showMessage = (message) => {
//não perde o escopo (this)
return this.getMessage(this.getMessage());
@durvalrafael
durvalrafael / class.js
Created May 24, 2017 23:12
Exemplo de Classe ES2015
class Teste {
constructor() {
console.log("Constructor inicado");
this.showMessage();
}
showMessage(){
console.log("Método showMessage acionado");
}
}
var teste = new Teste();
@durvalrafael
durvalrafael / index.html
Created April 5, 2017 12:12
Whats Color is it ES 2015
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300" rel="stylesheet">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<style>
body {
font-family: 'Roboto', sans-serif;
@durvalrafael
durvalrafael / sublime_option.json
Last active January 31, 2017 16:57
Sublime text ignores files by pattern
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
".sass-cache",
"node_modules"
]
echo "Server name :"
read vhost
echo "Main path (Ex.: /var/www/example) :"
read path
echo "Creating VHost configuration"
echo "<VirtualHost *:80>