Skip to content

Instantly share code, notes, and snippets.

View toruticas's full-sized avatar

Rafael Mariano toruticas

View GitHub Profile
@maxcnunes
maxcnunes / alias-docker-compose.sh
Last active August 27, 2023 15:11
Aliases for docker-compose
alias c='docker-compose'
alias cb='docker-compose build'
alias cup='docker-compose up'
alias cr='docker-compose run --service-ports --rm'
alias crl='docker-compose run --service-ports --rm local'
alias crd='docker-compose run --service-ports --rm develop'
alias crt='docker-compose run --rm test'
alias crp='docker-compose run --rm provision'
alias crci='docker-compose run --rm ci'
alias crwt='docker-compose run --rm watchtest'
@davej
davej / fetch-timeout.js
Last active July 1, 2022 23:35
Add a pseudo timeout/deadline to a request using the ES6 fetch api
Promise.race([
fetch('/foo'),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), 7000)
)
]);
@toruticas
toruticas / config.lua
Last active November 14, 2024 19:24
Neovim configs: ~/.config/nvim/*
local iron = require("iron.core")
local view = require("iron.view")
iron.setup {
config = {
-- Whether a repl should be discarded or not
scratch_repl = true,
-- Your repl definitions come here
repl_definition = {
sh = {
@toruticas
toruticas / .zshrc
Last active September 20, 2022 07:03
export ZSH="/Users/rs0230/.oh-my-zsh"
ZSH_THEME='gnzh'
plugins=(
git
dnf
zsh-autosuggestions
)
@toruticas
toruticas / CocConfig.json
Last active November 14, 2024 19:16
CoC extensions: ~/.config/coc/extensions/package.json; CoC config: ~/.config/nvim/coc-settings.json
{
"codeLens.enable": false,
"eslint.fixOnSaveTimeout": 1,
"suggest.noselect": false,
"coc.preferences.formatOnSaveFiletypes": ["*"],
"python.venvPath": "${env:HOME}/.pyenv/versions",
"python.formatting.provider": "black",
"python.formatting.provider": "black",
"python.formatting.blackPath": "${env:HOME}/.pyenv/shims/black",
"python.formatting.blackArgs": ["-l 120"],
@toruticas
toruticas / toruticas.zsh-theme
Last active October 7, 2023 08:24
.oh-my-zsh/themes/toruticas.zsh-theme
# Based on gnzhtheme
setopt prompt_subst
() {
local PR_USER PR_USER_OP PR_PROMPT PR_HOST
# Check the UID
if [[ $UID -ne 0 ]]; then # normal user