Skip to content

Instantly share code, notes, and snippets.

View WallasFaria's full-sized avatar

Wallas Faria da Silva WallasFaria

  • Shellbox | Raizen
  • Rio de Janeiro, Brasil
View GitHub Profile
@erdostom
erdostom / Dockerfile
Last active November 25, 2022 14:53
Good starter Dockerfile + docker-compose.yml for Rails 6.
FROM ruby:2.6.5-alpine
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn
RUN gem install bundler:2.1.4
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --check-files
@zentetsukenz
zentetsukenz / ruby_on_rails_deployment.md
Last active September 22, 2023 18:32
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
anonymous
anonymous / Long-Shadow-Explained-JS.markdown
Created November 3, 2014 01:22
A Pen by Tim Daubenschütz.

Long Shadow Explained JS

I wanted to understand how these longshadows work, so I decided to code it myself.

Looks pretty sweet if you ask me :)

A Pen by Tim Daubenschütz on CodePen.

License.

anonymous
anonymous / Collection-of-animated-loaders.markdown
Created November 3, 2014 00:32
A Pen by Ana Tudor.

Collection of animated loaders

Inspired by this article, except I've tried to create one element (no cheating with pseudos) versions. Not meant to reproduce the loaders in the article exactly and may have poorer browser support.

A Pen by Ana Tudor on CodePen.

License.

@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active November 29, 2023 17:57
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
@jeffersonsouza
jeffersonsouza / how-to
Last active April 19, 2017 04:44
Instalação do NGINX + PHP FPM + Percona MySQL + Varnish no Ubuntu 12.04Tutorial retirado do site:http://www.ubuntubrsc.com/instalando-nginx-php-fpm-apc-varnish-mysql-ubuntu-server-12-04.html
A versão do Nginx disponível nos repositórios oficiais do Ubuntu 12.04 é a 1.1.19, mas queremos a usar a versão estável atual, então vamos adicionar o repositório PPA oficial do Nginx ao nosso VPS. Para isso, digite o seguinte comando no terminal:
nano /etc/apt/sources.list
Com o arquivo de repositórios aberto, navegue até o final do arquivo com as setas de direção do seu teclado e adicione a linha abaixo:
deb http://ppa.launchpad.net/nginx/stable/ubuntu precise main
Adicione o repositório PPA do Nginx no final do arquivo sources.list
Feito isso, aperte <Ctrl + O> para salvar e <Ctrl + X> para fechar o arquivo e voltar ao terminal. Agora ainda com o terminal aberto, vamos adicionar a chave de autentificação do PPA, atualizar a lista de repositórios e atualizar o sistema todo. Copie e cole os comandos abaixo, lembrando de dar enter ao final de cada linha:
@rodrigomanhaes
rodrigomanhaes / bola.rb
Created November 30, 2011 03:39
Soluções em Ruby da Lista 1 de exercícios de Programação Orientada a Objetos
class Bola
def initialize(cor)
@cor = cor
end
attr_accessor :cor
end