Skip to content

Instantly share code, notes, and snippets.

View vitormil's full-sized avatar

Vitor Oliveira vitormil

View GitHub Profile
@vitormil
vitormil / settings-windows-terminal.json
Created April 18, 2021 02:46
Windows Terminal Settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
{
"command": {
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
create table test (id int, a timestamp) partition by list ( (trunc(extract(second from a))::int % 3));
create table test01 partition of test for values in (0);
create table test02 partition of test for values in (1);
create table test03 partition of test for values in (2);
insert into test values (555, now());
select *
from test
@vitormil
vitormil / .gitconfig
Created January 27, 2022 14:41
diff-so-fancy configuration
...
[interactive]
diffFilter = diff-so-fancy --patch
[color "diff-highlight"]
oldNormal = red
oldHighlight = red 52
newNormal = green
newHighlight = green 22
[color "diff"]
@vitormil
vitormil / settings.json
Created June 14, 2022 14:46
VS Code settings
{
"workbench.colorTheme": "Night Owl",
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "'Dank Mono', 'JetBrains Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "400",
"workbench.startupEditor": "newUntitledFile",
@vitormil
vitormil / keybindings.json.txt
Created July 15, 2022 15:25
3 Keyboard Shortcuts to Navigate Your Code Faster
[
// IntelliJ -> Navigate - Back
{
"key": "cmd+[",
"command": "workbench.action.navigateBack"
},
// IntelliJ -> Navigate - Forward
{
"key": "cmd+]",
"command": "workbench.action.navigateForward"
@vitormil
vitormil / pre-commit
Created May 10, 2023 09:33
Git Hooks
#!/bin/sh
current_branch=`git rev-parse --abbrev-ref HEAD`
if [[ $current_branch =~ master|main ]]; then
message="Please don't commit directly to $current_branch."
echo "💥 \033[1;31mERROR: $message\033[0m";
exit 1
fi
@vitormil
vitormil / .gitconfig
Last active July 13, 2023 11:12
git-delta
[init]
defaultBranch = master
[alias]
b = branch
aa = add --all
st = status
s = status -sb
co = checkout
ci = commit -v
cp = cherry-pick