Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

João Marcos joaomarcos96

🎯
Focusing
View GitHub Profile
View .gitconfig
[core]
autocrlf = input
pager = delta
[delta]
side-by-side = true
[alias]
ignore-local = update-index --skip-worktree
unignore-local = update-index --no-skip-worktree
ignored-local = !git ls-files -v | grep "^S"
@joaomarcos96
joaomarcos96 / arch_faster_rubocop_vscode.md
Last active Feb 8, 2021
Faster RuboCop for VSCode in Arch Linux
View arch_faster_rubocop_vscode.md
@joaomarcos96
joaomarcos96 / pre-push.sh
Last active Feb 8, 2021
git pre-push hook to confirm push force or delete on any branch
View pre-push.sh
#!/bin/sh
current_branch=$(git rev-parse --abbrev-ref HEAD)
push_command=$(ps -ocommand= -p $PPID)
is_destructive='force|delete|\-f'
confirm_destructive_action(){
read -p 'Are you sure you want to push to "'$current_branch'" ? (y/n): ' -n 1 -r < /dev/tty
@joaomarcos96
joaomarcos96 / ExportOptions.plist
Last active Mar 19, 2021
iOS automated deploy
View ExportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>upload</string>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>MyTeamID</string> <!-- your team ID, something like "AB12C345DE" -->
View arch_ruby_2.3_install.md

Installing Ruby 2.3.x in Arch Linux

Have openssl-1.0 and gcc installed

sudo pacman -S --needed openssl-1.0 gcc

Install Ruby 2.3.x with gcc and openssl path defined

View pagination_example.dart
class Pagination<T> {
Pagination({
this.page,
this.perPage,
this.total,
this.totalPages,
this.collection,
});
int page;
View .zshrc
# source ASDF
source $HOME/.asdf/asdf.sh
# source ZSH autosuggestions
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# append completions to fpath
fpath=(${ASDF_DIR}/completions $fpath)
fpath=(${HOME}/.zsh.d/ $fpath)
View Manjaro-Post-Install.md

Manjaro post install

Update mirrors:

sudo pacman-mirrors --geoip && sudo pacman -Syyu

Check Pacman updates:

checkupdates
@joaomarcos96
joaomarcos96 / settings.jsonc
Last active May 9, 2022
Visual Studio Code user settings
View settings.jsonc
{
// Breadcrumbs config
"breadcrumbs.enabled": true,
// Diff editor config
"diffEditor.ignoreTrimWhitespace": false,
// Editor config
"editor.bracketPairColorization.enabled": false,
"editor.fontLigatures": false,
@joaomarcos96
joaomarcos96 / .editorconfig
Last active May 23, 2020
.editorconfig for .NET
View .editorconfig
[*.{appxmanifest,asax,ascx,aspx,build,cs,cshtml,dtd,fs,fsi,fsscript,fsx,master,ml,mli,nuspec,razor,resw,resx,skin,vb,xaml,xamlx,xoml,xsd}]
indent_style=space
indent_size=4
tab_width=4
trim_trailing_whitespace=true
insert_final_newline=true
charset=utf-8
end_of_line=lf