Skip to content

Instantly share code, notes, and snippets.

View thadeu's full-sized avatar
🏠
Working from home

thadeu thadeu

🏠
Working from home
View GitHub Profile
@thadeu
thadeu / ws-passenger-apache2-proxy.conf.md
Last active August 9, 2023 17:36
ActionCable WebSocket with Passenger + Apache2 + ProxyPass/ProxyPassReverse

Requirements:

  • httpd 2.4.5 and later
  • Enable Apache2 modules:
sudo a2enmod proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html proxy_wstunnel
<VirtualHost *:80  *:443>
@thadeu
thadeu / Dockerfile
Last active December 27, 2017 20:39
Docker for Ruby on Rails
FROM ruby:2.3.1
MAINTAINER Thadeu Esteves Jr <eu@thadeuesteves.com.br>
# libs essentials
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
postgresql-client-9.4 \
libxml2-dev \
@thadeu
thadeu / .editorconfig
Last active June 27, 2017 16:36
Default .editorconfig
; Pra todos os arquivos
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
; Estilo de identação em arquivos HTML
[*.html]
indent_style = space
indent_size = 2
@thadeu
thadeu / MainApp.js
Created February 17, 2017 13:57 — forked from aphillipo/MainApp.js
Wrapping React Native Navigator
class MainApp extends Component {
constructor(props) {
super(props);
}
renderScene(route, navigator) {
var Component = route.component;
return (
<Component route={route} navigator={navigator} />
);
@thadeu
thadeu / 🛠 Packages for Developer Atom Editor.md
Last active January 23, 2017 13:01
Packages for Developer Atom Editor

Extensions Atom Editor January 2017

  • atom-beautify
  • autocomplete-modules
  • autocomplete-paths
  • color-picker
  • docblockr
  • editorconfig
  • emmet
  • emmet-jsx-css-modules
@thadeu
thadeu / Set Limit Log File Rails.md
Last active January 23, 2017 13:01
🎉 Set Limit Log File Rails

Add this to config/environments/development.rb

config.logger = Logger.new(config.paths["log"].first, 20 * 1024) # 20 megabytes

Add this to config/environments/production.rb

config.logger = Logger.new(config.paths["log"].first, 20 * 1024) # 20 megabytes

Add this to config/environments/test.rb

config.logger = Logger.new(config.paths["log"].first, 20 * 1024) # 20 megabytes

@thadeu
thadeu / gist:17422266d9df880361c67f7dcff1105c
Created October 24, 2016 17:30
User Snippets ERB - Visual Studio Code
{
"ERB Block": {
"prefix": "erb",
"body": [
"<%$1 %>"
],
"description": "Block Erb Tag"
},
"End Block": {
@thadeu
thadeu / gist:f8ef62a5cbc3312af35dd297b216db83
Created October 24, 2016 17:30
Keyboard Shortcuts- Visual Studio Code
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" },
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" },
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" },
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" },
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" },
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" },
{ "key": "cmd+7", "command": "workbench.action.openEditorAtIndex7" },
{ "key": "cmd+8", "command": "workbench.action.openEditorAtIndex8" },
@thadeu
thadeu / gist:b22bf4a8ed9869244a13e25e58e0ff7a
Created October 24, 2016 17:28
User Setting - Visual Studio Code
// Place your settings in this file to overwrite the default settings
{
// The number of spaces a tab is equal to.
"editor.tabSize": 2,
// Controls if the editor will insert spaces for tabs.
// If set to auto, the value will be guessed based on the opened file.
"editor.insertSpaces": false,
// Controls whether the editor should render whitespace characters
@thadeu
thadeu / gist:76546c0d8b257377e984be719b8abb6a
Created October 24, 2016 17:28
Extensions Visual Studio Code Developer
erb
EditorConfig for VS Code
HTML CSS Class Completion
HTML Snippets
One Dark Theme
haml-syntax
ruby-on-rails-snippets
TWIG Pack
Path Intellisense
Git History (git log)