Skip to content

Instantly share code, notes, and snippets.

View luigiMinardi's full-sized avatar
🎯
Focusing

Luigi Minardi luigiMinardi

🎯
Focusing
View GitHub Profile
%reset-Button {
border: none;
margin: 0;
padding: 0;
width: auto;
overflow: visible;
background: transparent;
/* inherit font & color from ancestor */
@harssh
harssh / git_alias
Created June 15, 2015 15:13
ZSH git alias
alias ggpur='ggu'
compdef _git ggpur=git-checkout
alias gignore='git update-index --assume-unchanged'
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
compdef git-svn-dcommit-push=git
alias gk='\gitk --all --branches'
compdef _git gk='gitk'
@romellem
romellem / commit-msg
Created June 13, 2016 16:11
Git hook - Post-commit spell check (using `aspell`)
#!/bin/bash
ASPELL=$(which aspell)
if [ $? -ne 0 ]; then
echo "Aspell not installed - unable to check spelling" >&2
exit
else
WORDS=$($ASPELL --mode=email --add-email-quote='#' list < "$1" | sort -u)
fi
if [ -n "$WORDS" ]; then
printf "\e[1;33m Possible spelling errors found in commit message:\n\e[0m\e[0;31m%s\n\e[0m\e[1;33m Use git commit --amend to change the message.\e[0m\n\n" "$WORDS" >&2
@Cheesetouched
Cheesetouched / .gitignore
Created March 3, 2019 04:18
Standardised gitignore for your Flutter apps & Dart projects
### Flutter Generated
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
neofetch --off
@silvioprog
silvioprog / commit-msg.sh
Last active August 8, 2022 21:46
Spell checking for git commit message using aspell(1).
#!/bin/sh
#
# This file is distributed under Public domain.
#
# Author: silvioprog.
#
# Installing:
#
# - `$ mv commit-msg.sh .git/hooks/commit-msg`
# - `$ chmod +x .git/hooks/commit-msg`
@aquiseb
aquiseb / commit-msg.md
Last active January 30, 2024 08:45
Husky Node.js - Git commit prepend issue tag to commit message

Automatically prepend issue tag to commit message

From the following tutorial

Consistency is a very important factor in software development.

But because different developers have different experiences and preferences it takes some time and effort to achieve consistency in projects.

A solution to that are discussed and then tool-enforced rules. Some solutions to that are linters, code formatters, checks on the CI and code reviews.

@yovko
yovko / ohmyzsh.md
Last active June 19, 2024 06:18
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

@devrishik
devrishik / PostgreSQL JSON Indexing and Django Models references
Last active January 10, 2024 17:36
A quick cook book to Postgres indexes and Django model references
Django provides references to all of the existing indexes in Postgres.
Django managers can be used for managing indexes dynamically, a handle
can be provided as IndexManager to extend for custom querysets or raw sql queries.
PostGres
--------
Types of indexes: https://www.postgresql.org/docs/9.1/indexes-types.html
BRIN: Block Range Index: good for comparing blocks with relative location data
Btree (default): @> <> =:
@navsqi
navsqi / globalErrorSqlz.js
Created August 2, 2020 17:31
sequelize global error handling
// in models/index.js
if (sequelize) {
sequelize
.authenticate()
.then(() => {
console.log('Connection has been established successfully.');
})
.catch((err) => {
console.error('Unable to connect to the database:', err);
});