sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.local/share/nvim/plugged') | |
" | |
" Plugins from: https://hannadrehman.com/top-neovim-plugins-for-developers-in-2022 | |
" Rust setup from: https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/ | |
" | |
" | |
Plug 'rust-lang/rust.vim' | |
Plug 'scrooloose/nerdcommenter' " | |
Plug 'phaazon/hop.nvim' "keyword base navigation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Users.Input do | |
@moduledoc false | |
@type params :: map() | Keyword.t() | |
alias MyApp.Utils | |
alias MyApp.Users.{User} | |
defmodule Create do | |
@moduledoc """ | |
Input for `MyApp.Users.create/1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Router é feito com macros, pipeline e scopes são macros. | |
# O `scope` é um grupo de rotas que compartilham determinado prefixo. | |
# Você pode criar um escopo para agrupar as rotas do painel admin de uma aplicação | |
# e outro para a API json da sua aplicação, etc.. | |
# rotas da área admin do sistema | |
scope "/admin", MeuAppWeb.Admin do | |
get "/foo/new", FooController, :new # vai ser compilado como: GET /admin/foo/new | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Project: https://github.com/getsentry/sentry | |
# Doc: https://docs.getsentry.com/on-premise/server/installation/python/ | |
udo apt-get update | |
sudo apt-get install python-virtualenv | |
sudo apt-get install python-setuptools | |
sudo apt-get install python-pip | |
sudo apt-get install libxslt1-dev | |
sudo apt-get install gcc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
export RUN_AS='ubuntu'; | |
export INSTALL_DIR='/var/www/sentry'; | |
HOSTNAME='http://mysentry.example.com'; # No trailing slash | |
DB_HOST='something.rds.amazonaws.com'; | |
DB_PORT='5432'; | |
DB_USER='sentry'; | |
DB_NAME='sentry'; | |
DB_PASSWORD='DB_PASSWORD'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app deps | |
sudo yum update -y | |
# utf8 all the things | |
echo ' | |
export LC_ALL="en_US.UTF-8" | |
export LANG="en_US.UTF-8" | |
export LANGUAGE="en_US.UTF-8" | |
' >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Sql | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" use with vim-polyglot | |
" paste in vim-polyglot/after/syntax/ruby.vim | |
let s:bcs = b:current_syntax | |
unlet b:current_syntax | |
syn include @SQL syntax/pgsql.vim | |
let b:current_syntax = s:bcs | |
syntax region rubyHereDocSQL matchgroup=Statement start=+<<\z(SQL\)+ end=+^\z1$+ contains=@SQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Config do | |
@moduledoc """ | |
This module handles fetching values from the config with some additional niceties | |
""" | |
@doc """ | |
Fetches a value from the config, or from the environment if {:system, "VAR"} | |
is provided. | |
An optional default value can be provided if desired. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App exposing (..) | |
import Html exposing (..) | |
import Html.App as HtmlApp | |
import Html.Events exposing (..) | |
import Html.Attributes exposing (..) | |
import String | |
import Set exposing (Set) | |
import Dict exposing (Dict) |
NewerOlder