In git merge there are several ways to merge branches however, the most commonly used options are --ff-only
and --no-ff
. The --ff-only
option will resolve the merge as a fast-forward when possible. When not possible, it refuses to merge and will exit with a non-zero status. Best examples used by this options are branches from features and hotfixes.
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
# Use systemd for managing NVIDIA driver suspend in drivers ====>>> PRIOR to version 470 <<<===== | |
# https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/powermanagement.html | |
# https://forums.developer.nvidia.com/t/unable-to-set-nvidia-kernel-module-parameters/161306 | |
# Please note: In Fedora Linux you may need to just install the xorg-x11-drv-nvidia-power pakage | |
# as sugested by @goombah88 in the comments below. | |
TMP_PATH=/var/tmp | |
TMPL_PATH=/usr/share/doc/nvidia-driver-460/ | |
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=${TMP_PATH}" | sudo tee /etc/modprobe.d/nvidia-power-management.conf |
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
document = ["This is Import Data's YouTube channel", | |
"Data Science is my passion and it is fun", | |
"Please subscribe to my channel"] | |
# create the transform | |
vectorizer = CountVectorizer() | |
# tokenize and make the document into a matrix | |
doc_term_matrix = vectorizer.fit_transform(document) | |
pd.DataFrame(doc_term_matrix.toarray(),columns = vectorizer.get_feature_names()) |
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
{ | |
"suggest.noselect": false, | |
"coc.preferences.formatOnSaveFiletypes": [ | |
"javascript", | |
"typescript", | |
"typescriptreact", | |
"json", | |
"javascriptreact", | |
"typescript.tsx", | |
"graphql" |
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
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'scrooloose/nerdtree' | |
"Plug 'tsony-tsonev/nerdtree-git-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'airblade/vim-gitgutter' |
/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉
- Generate your SSH keys as per your git provider documentation.
- Add each public SSH keys to your git providers acounts.
- In your
~/.ssh/config
, set each ssh key for each repository as in this exemple:
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
location / { | |
rewrite ^(.+)/$ $1 permanent; | |
rewrite ^(.+)/index\.html$ $1 permanent; | |
rewrite ^(.+)\.html$ $1 permanent; | |
# Allow CORS for static files | |
add_header Access-Control-Allow-Origin $cors_origin; | |
add_header Access-Control-Allow-Methods "GET, OPTIONS"; | |
location ~* ^/files/.*.(htm|html|svg|xml) { |
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
# oh-my-zsh Theme | |
# Default robbyrussell theme with node version info. | |
# Installation: place this file in .oh-my-zsh/custom/themes/robbyrussell.zsh_theme | |
function node_prompt_version { | |
if which node &> /dev/null; then | |
echo "%{$fg_bold[blue]%}node(%{$fg[red]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}" | |
fi | |
} |
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/sh | |
# To enable this hook, rename this file to "pre-commit". | |
############################################################################### | |
# https://gist.github.com/stuntgoat/8800170 | |
# Git pre-commit hook for finding and warning about Python print | |
# statements. | |
# |
This repo has some handy handy hooks to run bundle
or npm install
whenever you:
git checkout
a new branch with a different Gemfile or package.jsongit pull
a change to Gemfile or package.json
git clone https://gist.github.com/5869846.git hooks && cd hooks && chmod +x install
NewerOlder