Skip to content

Instantly share code, notes, and snippets.

View YuriFontella's full-sized avatar
💭
sad dev

Yuri Fontella YuriFontella

💭
sad dev
  • Porto Alegre - RS
View GitHub Profile
@YuriFontella
YuriFontella / arch-install.txt
Last active May 21, 2017 19:08
Arch Linux Install
# loadkeys br-abnt2
REDE
# systemctl start dhcpcd # Habilita o dhcpcd
Testando a conexão:
# ping -c3 google.com
@YuriFontella
YuriFontella / git.txt
Created May 14, 2017 22:25
Comandos git
Primeiro repositório:
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/YuriFontella/algum-repositorio.git
git push -u origin master
Instalando o Git
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { FileUploader } from 'ng2-file-upload';
import { ProfileService } from './profile.service';
@Component({
selector: 'app-profile',
templateUrl: './profile.component.html',
@YuriFontella
YuriFontella / source.list
Created March 31, 2016 15:25
kde neon 15.10
deb http://br.archive.ubuntu.com/ubuntu/ wily main restricted
deb-src http://br.archive.ubuntu.com/ubuntu/ wily main restricted
deb http://br.archive.ubuntu.com/ubuntu/ wily-updates main restricted
deb-src http://br.archive.ubuntu.com/ubuntu/ wily-updates main restricted
deb http://br.archive.ubuntu.com/ubuntu/ wily universe
deb-src http://br.archive.ubuntu.com/ubuntu/ wily universe
deb http://br.archive.ubuntu.com/ubuntu/ wily-updates universe
deb-src http://br.archive.ubuntu.com/ubuntu/ wily-updates universe
worker_processes 2;
error_log /opt/nginx/logs/error.log;
pid /opt/nginx/logs/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
class User < ActiveRecord::Base
has_many :activities
# Ativamente... os que eu sigo
has_many :active_relationships, class_name: 'Relationship', foreign_key: 'follower_id', dependent: :destroy
has_many :following, through: :active_relationships, source: :followed
end
@YuriFontella
YuriFontella / book.json
Created February 20, 2016 04:49
book chapters pages
{
"id":9,
"name":"Teste",
"public":"0",
"slug":"teste",
"description":"Teste",
"indication":"public",
"sinopse":null,
"category":"Drama",
"ratings_count":0,
default:
selector: textarea.redactor
theme: modern
statusbar: false
toolbar1: insertfile undo redo | styleselect | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image
toolbar2: print searchreplace media | forecolor backcolor emoticons | fontsizeselect fontselect
plugins:
- autoresize
- advlist
- autolink
@YuriFontella
YuriFontella / nginx.conf
Last active February 29, 2016 23:21
Passenger nginx file conf
worker_processes 1;
error_log /opt/nginx/logs/error.log;
pid /opt/nginx/logs/nginx.pid;
events {
worker_connections 1024;
}
http {
@YuriFontella
YuriFontella / filesInvite.rb
Last active November 10, 2015 01:38
Form/Mail/Rails
# Formulário
<%= form_tag invites_path, class: 'ui invite' do %>
<div class="ui action input" style="width:45%">
<%= text_field_tag 'email', nil, placeholder: "E-mail..." %>
<div class="ui icon button refresh" type="submit"><i class="mail icon"></i></div>
</div>
<% end %>
# Controller